migrating to the latest JUCE version
@@ -1,7 +1,7 @@
 | 
			
		||||
apply plugin: 'com.android.application'
 | 
			
		||||
 | 
			
		||||
android {
 | 
			
		||||
    compileSdkVersion 29
 | 
			
		||||
    compileSdkVersion 31
 | 
			
		||||
    externalNativeBuild {
 | 
			
		||||
        cmake {
 | 
			
		||||
            path "CMakeLists.txt"
 | 
			
		||||
@@ -20,7 +20,7 @@ android {
 | 
			
		||||
    defaultConfig {
 | 
			
		||||
        applicationId "com.rmsl.jucedemorunner"
 | 
			
		||||
        minSdkVersion    23
 | 
			
		||||
        targetSdkVersion 29
 | 
			
		||||
        targetSdkVersion 31
 | 
			
		||||
        externalNativeBuild {
 | 
			
		||||
            cmake {
 | 
			
		||||
                arguments "-DANDROID_TOOLCHAIN=clang", "-DANDROID_PLATFORM=android-23", "-DANDROID_STL=c++_static", "-DANDROID_CPP_FEATURES=exceptions rtti", "-DANDROID_ARM_MODE=arm", "-DANDROID_ARM_NEON=TRUE", "-DCMAKE_CXX_STANDARD=14", "-DCMAKE_CXX_EXTENSIONS=OFF"
 | 
			
		||||
 
 | 
			
		||||
@@ -1,11 +1,12 @@
 | 
			
		||||
<?xml version="1.0" encoding="utf-8"?>
 | 
			
		||||
 | 
			
		||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="6.1.2"
 | 
			
		||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="7.0.2"
 | 
			
		||||
          package="com.rmsl.jucedemorunner">
 | 
			
		||||
  <supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:anyDensity="true"
 | 
			
		||||
                    android:xlargeScreens="true"/>
 | 
			
		||||
  <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
 | 
			
		||||
  <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="28"/>
 | 
			
		||||
  <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
 | 
			
		||||
  <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
 | 
			
		||||
  <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
 | 
			
		||||
  <uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
 | 
			
		||||
  <uses-permission android:name="android.permission.BLUETOOTH"/>
 | 
			
		||||
@@ -16,7 +17,8 @@
 | 
			
		||||
  <uses-feature android:glEsVersion="0x00030000" android:required="true"/>
 | 
			
		||||
  <application android:label="@string/app_name" android:name="com.rmsl.juce.JuceApp" android:icon="@drawable/icon" android:hardwareAccelerated="false">
 | 
			
		||||
    <activity android:name="com.rmsl.juce.JuceActivity" android:label="@string/app_name" android:configChanges="keyboardHidden|orientation|screenSize"
 | 
			
		||||
              android:screenOrientation="unspecified" android:launchMode="singleTask" android:hardwareAccelerated="true">
 | 
			
		||||
              android:screenOrientation="unspecified" android:launchMode="singleTask" android:hardwareAccelerated="true"
 | 
			
		||||
              android:exported="true">
 | 
			
		||||
      <intent-filter>
 | 
			
		||||
        <action android:name="android.intent.action.MAIN"/>
 | 
			
		||||
        <category android:name="android.intent.category.LAUNCHER"/>
 | 
			
		||||
 
 | 
			
		||||
@@ -1,72 +1,72 @@
 | 
			
		||||
/*
 | 
			
		||||
  ==============================================================================
 | 
			
		||||
 | 
			
		||||
   This file is part of the JUCE examples.
 | 
			
		||||
   Copyright (c) 2020 - Raw Material Software Limited
 | 
			
		||||
 | 
			
		||||
   The code included in this file is provided under the terms of the ISC license
 | 
			
		||||
   http://www.isc.org/downloads/software-support-policy/isc-license. Permission
 | 
			
		||||
   To use, copy, modify, and/or distribute this software for any purpose with or
 | 
			
		||||
   without fee is hereby granted provided that the above copyright notice and
 | 
			
		||||
   this permission notice appear in all copies.
 | 
			
		||||
 | 
			
		||||
   THE SOFTWARE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES,
 | 
			
		||||
   WHETHER EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR
 | 
			
		||||
   PURPOSE, ARE DISCLAIMED.
 | 
			
		||||
 | 
			
		||||
  ==============================================================================
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
//==============================================================================
 | 
			
		||||
/* This component scrolls a continuous waveform showing the audio that's
 | 
			
		||||
   coming into whatever audio inputs this object is connected to.
 | 
			
		||||
*/
 | 
			
		||||
class LiveScrollingAudioDisplay  : public AudioVisualiserComponent,
 | 
			
		||||
                                   public AudioIODeviceCallback
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
    LiveScrollingAudioDisplay()  : AudioVisualiserComponent (1)
 | 
			
		||||
    {
 | 
			
		||||
        setSamplesPerBlock (256);
 | 
			
		||||
        setBufferSize (1024);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    //==============================================================================
 | 
			
		||||
    void audioDeviceAboutToStart (AudioIODevice*) override
 | 
			
		||||
    {
 | 
			
		||||
        clear();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void audioDeviceStopped() override
 | 
			
		||||
    {
 | 
			
		||||
        clear();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void audioDeviceIOCallback (const float** inputChannelData, int numInputChannels,
 | 
			
		||||
                                float** outputChannelData, int numOutputChannels,
 | 
			
		||||
                                int numberOfSamples) override
 | 
			
		||||
    {
 | 
			
		||||
        for (int i = 0; i < numberOfSamples; ++i)
 | 
			
		||||
        {
 | 
			
		||||
            float inputSample = 0;
 | 
			
		||||
 | 
			
		||||
            for (int chan = 0; chan < numInputChannels; ++chan)
 | 
			
		||||
                if (const float* inputChannel = inputChannelData[chan])
 | 
			
		||||
                    inputSample += inputChannel[i];  // find the sum of all the channels
 | 
			
		||||
 | 
			
		||||
            inputSample *= 10.0f; // boost the level to make it more easily visible.
 | 
			
		||||
 | 
			
		||||
            pushSample (&inputSample, 1);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // We need to clear the output buffers before returning, in case they're full of junk..
 | 
			
		||||
        for (int j = 0; j < numOutputChannels; ++j)
 | 
			
		||||
            if (float* outputChannel = outputChannelData[j])
 | 
			
		||||
                zeromem (outputChannel, (size_t) numberOfSamples * sizeof (float));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (LiveScrollingAudioDisplay)
 | 
			
		||||
};
 | 
			
		||||
/*
 | 
			
		||||
  ==============================================================================
 | 
			
		||||
 | 
			
		||||
   This file is part of the JUCE examples.
 | 
			
		||||
   Copyright (c) 2022 - Raw Material Software Limited
 | 
			
		||||
 | 
			
		||||
   The code included in this file is provided under the terms of the ISC license
 | 
			
		||||
   http://www.isc.org/downloads/software-support-policy/isc-license. Permission
 | 
			
		||||
   To use, copy, modify, and/or distribute this software for any purpose with or
 | 
			
		||||
   without fee is hereby granted provided that the above copyright notice and
 | 
			
		||||
   this permission notice appear in all copies.
 | 
			
		||||
 | 
			
		||||
   THE SOFTWARE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES,
 | 
			
		||||
   WHETHER EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR
 | 
			
		||||
   PURPOSE, ARE DISCLAIMED.
 | 
			
		||||
 | 
			
		||||
  ==============================================================================
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
//==============================================================================
 | 
			
		||||
/* This component scrolls a continuous waveform showing the audio that's
 | 
			
		||||
   coming into whatever audio inputs this object is connected to.
 | 
			
		||||
*/
 | 
			
		||||
class LiveScrollingAudioDisplay  : public AudioVisualiserComponent,
 | 
			
		||||
                                   public AudioIODeviceCallback
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
    LiveScrollingAudioDisplay()  : AudioVisualiserComponent (1)
 | 
			
		||||
    {
 | 
			
		||||
        setSamplesPerBlock (256);
 | 
			
		||||
        setBufferSize (1024);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    //==============================================================================
 | 
			
		||||
    void audioDeviceAboutToStart (AudioIODevice*) override
 | 
			
		||||
    {
 | 
			
		||||
        clear();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void audioDeviceStopped() override
 | 
			
		||||
    {
 | 
			
		||||
        clear();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void audioDeviceIOCallback (const float** inputChannelData, int numInputChannels,
 | 
			
		||||
                                float** outputChannelData, int numOutputChannels,
 | 
			
		||||
                                int numberOfSamples) override
 | 
			
		||||
    {
 | 
			
		||||
        for (int i = 0; i < numberOfSamples; ++i)
 | 
			
		||||
        {
 | 
			
		||||
            float inputSample = 0;
 | 
			
		||||
 | 
			
		||||
            for (int chan = 0; chan < numInputChannels; ++chan)
 | 
			
		||||
                if (const float* inputChannel = inputChannelData[chan])
 | 
			
		||||
                    inputSample += inputChannel[i];  // find the sum of all the channels
 | 
			
		||||
 | 
			
		||||
            inputSample *= 10.0f; // boost the level to make it more easily visible.
 | 
			
		||||
 | 
			
		||||
            pushSample (&inputSample, 1);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // We need to clear the output buffers before returning, in case they're full of junk..
 | 
			
		||||
        for (int j = 0; j < numOutputChannels; ++j)
 | 
			
		||||
            if (float* outputChannel = outputChannelData[j])
 | 
			
		||||
                zeromem (outputChannel, (size_t) numberOfSamples * sizeof (float));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (LiveScrollingAudioDisplay)
 | 
			
		||||
};
 | 
			
		||||
 
 | 
			
		||||
@@ -1,51 +1,51 @@
 | 
			
		||||
 | 
			
		||||
#ifndef AddPair_H
 | 
			
		||||
#define AddPair_H
 | 
			
		||||
 | 
			
		||||
class AddPair : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
 | 
			
		||||
    AddPair()
 | 
			
		||||
    {
 | 
			
		||||
        m_world->SetGravity(b2Vec2(0.0f,0.0f));
 | 
			
		||||
        {
 | 
			
		||||
            b2CircleShape shape;
 | 
			
		||||
            shape.m_p.SetZero();
 | 
			
		||||
            shape.m_radius = 0.1f;
 | 
			
		||||
 | 
			
		||||
            float minX = -6.0f;
 | 
			
		||||
            float maxX = 0.0f;
 | 
			
		||||
            float minY = 4.0f;
 | 
			
		||||
            float maxY = 6.0f;
 | 
			
		||||
 | 
			
		||||
            for (int i = 0; i < 400; ++i)
 | 
			
		||||
            {
 | 
			
		||||
                b2BodyDef bd;
 | 
			
		||||
                bd.type = b2_dynamicBody;
 | 
			
		||||
                bd.position = b2Vec2(RandomFloat(minX,maxX),RandomFloat(minY,maxY));
 | 
			
		||||
                b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
                body->CreateFixture(&shape, 0.01f);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(1.5f, 1.5f);
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
            bd.position.Set(-40.0f,5.0f);
 | 
			
		||||
            bd.bullet = true;
 | 
			
		||||
            b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
            body->CreateFixture(&shape, 1.0f);
 | 
			
		||||
            body->SetLinearVelocity(b2Vec2(150.0f, 0.0f));
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new AddPair;
 | 
			
		||||
    }
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef AddPair_H
 | 
			
		||||
#define AddPair_H
 | 
			
		||||
 | 
			
		||||
class AddPair : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
 | 
			
		||||
    AddPair()
 | 
			
		||||
    {
 | 
			
		||||
        m_world->SetGravity(b2Vec2(0.0f,0.0f));
 | 
			
		||||
        {
 | 
			
		||||
            b2CircleShape shape;
 | 
			
		||||
            shape.m_p.SetZero();
 | 
			
		||||
            shape.m_radius = 0.1f;
 | 
			
		||||
 | 
			
		||||
            float minX = -6.0f;
 | 
			
		||||
            float maxX = 0.0f;
 | 
			
		||||
            float minY = 4.0f;
 | 
			
		||||
            float maxY = 6.0f;
 | 
			
		||||
 | 
			
		||||
            for (int i = 0; i < 400; ++i)
 | 
			
		||||
            {
 | 
			
		||||
                b2BodyDef bd;
 | 
			
		||||
                bd.type = b2_dynamicBody;
 | 
			
		||||
                bd.position = b2Vec2(RandomFloat(minX,maxX),RandomFloat(minY,maxY));
 | 
			
		||||
                b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
                body->CreateFixture(&shape, 0.01f);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(1.5f, 1.5f);
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
            bd.position.Set(-40.0f,5.0f);
 | 
			
		||||
            bd.bullet = true;
 | 
			
		||||
            b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
            body->CreateFixture(&shape, 1.0f);
 | 
			
		||||
            body->SetLinearVelocity(b2Vec2(150.0f, 0.0f));
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new AddPair;
 | 
			
		||||
    }
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -1,183 +1,183 @@
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef APPLY_FORCE_H
 | 
			
		||||
#define APPLY_FORCE_H
 | 
			
		||||
 | 
			
		||||
class ApplyForce : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
    ApplyForce()
 | 
			
		||||
    {
 | 
			
		||||
        m_world->SetGravity(b2Vec2(0.0f, 0.0f));
 | 
			
		||||
 | 
			
		||||
        const float32 k_restitution = 0.4f;
 | 
			
		||||
 | 
			
		||||
        b2Body* ground;
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.position.Set(0.0f, 20.0f);
 | 
			
		||||
            ground = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2EdgeShape shape;
 | 
			
		||||
 | 
			
		||||
            b2FixtureDef sd;
 | 
			
		||||
            sd.shape = &shape;
 | 
			
		||||
            sd.density = 0.0f;
 | 
			
		||||
            sd.restitution = k_restitution;
 | 
			
		||||
 | 
			
		||||
            // Left vertical
 | 
			
		||||
            shape.Set(b2Vec2(-20.0f, -20.0f), b2Vec2(-20.0f, 20.0f));
 | 
			
		||||
            ground->CreateFixture(&sd);
 | 
			
		||||
 | 
			
		||||
            // Right vertical
 | 
			
		||||
            shape.Set(b2Vec2(20.0f, -20.0f), b2Vec2(20.0f, 20.0f));
 | 
			
		||||
            ground->CreateFixture(&sd);
 | 
			
		||||
 | 
			
		||||
            // Top horizontal
 | 
			
		||||
            shape.Set(b2Vec2(-20.0f, 20.0f), b2Vec2(20.0f, 20.0f));
 | 
			
		||||
            ground->CreateFixture(&sd);
 | 
			
		||||
 | 
			
		||||
            // Bottom horizontal
 | 
			
		||||
            shape.Set(b2Vec2(-20.0f, -20.0f), b2Vec2(20.0f, -20.0f));
 | 
			
		||||
            ground->CreateFixture(&sd);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2Transform xf1;
 | 
			
		||||
            xf1.q.Set(0.3524f * b2_pi);
 | 
			
		||||
            xf1.p = xf1.q.GetXAxis();
 | 
			
		||||
 | 
			
		||||
            b2Vec2 vertices[3];
 | 
			
		||||
            vertices[0] = b2Mul(xf1, b2Vec2(-1.0f, 0.0f));
 | 
			
		||||
            vertices[1] = b2Mul(xf1, b2Vec2(1.0f, 0.0f));
 | 
			
		||||
            vertices[2] = b2Mul(xf1, b2Vec2(0.0f, 0.5f));
 | 
			
		||||
 | 
			
		||||
            b2PolygonShape poly1;
 | 
			
		||||
            poly1.Set(vertices, 3);
 | 
			
		||||
 | 
			
		||||
            b2FixtureDef sd1;
 | 
			
		||||
            sd1.shape = &poly1;
 | 
			
		||||
            sd1.density = 4.0f;
 | 
			
		||||
 | 
			
		||||
            b2Transform xf2;
 | 
			
		||||
            xf2.q.Set(-0.3524f * b2_pi);
 | 
			
		||||
            xf2.p = -xf2.q.GetXAxis();
 | 
			
		||||
 | 
			
		||||
            vertices[0] = b2Mul(xf2, b2Vec2(-1.0f, 0.0f));
 | 
			
		||||
            vertices[1] = b2Mul(xf2, b2Vec2(1.0f, 0.0f));
 | 
			
		||||
            vertices[2] = b2Mul(xf2, b2Vec2(0.0f, 0.5f));
 | 
			
		||||
 | 
			
		||||
            b2PolygonShape poly2;
 | 
			
		||||
            poly2.Set(vertices, 3);
 | 
			
		||||
 | 
			
		||||
            b2FixtureDef sd2;
 | 
			
		||||
            sd2.shape = &poly2;
 | 
			
		||||
            sd2.density = 2.0f;
 | 
			
		||||
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
            bd.angularDamping = 5.0f;
 | 
			
		||||
            bd.linearDamping = 0.1f;
 | 
			
		||||
 | 
			
		||||
            bd.position.Set(0.0f, 2.0f);
 | 
			
		||||
            bd.angle = b2_pi;
 | 
			
		||||
            bd.allowSleep = false;
 | 
			
		||||
            m_body = m_world->CreateBody(&bd);
 | 
			
		||||
            m_body->CreateFixture(&sd1);
 | 
			
		||||
            m_body->CreateFixture(&sd2);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(0.5f, 0.5f);
 | 
			
		||||
 | 
			
		||||
            b2FixtureDef fd;
 | 
			
		||||
            fd.shape = &shape;
 | 
			
		||||
            fd.density = 1.0f;
 | 
			
		||||
            fd.friction = 0.3f;
 | 
			
		||||
 | 
			
		||||
            for (int i = 0; i < 10; ++i)
 | 
			
		||||
            {
 | 
			
		||||
                b2BodyDef bd;
 | 
			
		||||
                bd.type = b2_dynamicBody;
 | 
			
		||||
 | 
			
		||||
                bd.position.Set(0.0f, 5.0f + 1.54f * i);
 | 
			
		||||
                b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
                body->CreateFixture(&fd);
 | 
			
		||||
 | 
			
		||||
                float32 gravity = 10.0f;
 | 
			
		||||
                float32 I = body->GetInertia();
 | 
			
		||||
                float32 mass = body->GetMass();
 | 
			
		||||
 | 
			
		||||
                // For a circle: I = 0.5 * m * r * r ==> r = sqrt(2 * I / m)
 | 
			
		||||
                float32 radius = b2Sqrt(2.0f * I / mass);
 | 
			
		||||
 | 
			
		||||
                b2FrictionJointDef jd;
 | 
			
		||||
                jd.localAnchorA.SetZero();
 | 
			
		||||
                jd.localAnchorB.SetZero();
 | 
			
		||||
                jd.bodyA = ground;
 | 
			
		||||
                jd.bodyB = body;
 | 
			
		||||
                jd.collideConnected = true;
 | 
			
		||||
                jd.maxForce = mass * gravity;
 | 
			
		||||
                jd.maxTorque = mass * radius * gravity;
 | 
			
		||||
 | 
			
		||||
                m_world->CreateJoint(&jd);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Keyboard(unsigned char key)
 | 
			
		||||
    {
 | 
			
		||||
        switch (key)
 | 
			
		||||
        {
 | 
			
		||||
        case 'w':
 | 
			
		||||
            {
 | 
			
		||||
                b2Vec2 f = m_body->GetWorldVector(b2Vec2(0.0f, -200.0f));
 | 
			
		||||
                b2Vec2 p = m_body->GetWorldPoint(b2Vec2(0.0f, 2.0f));
 | 
			
		||||
                m_body->ApplyForce(f, p);
 | 
			
		||||
            }
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case 'a':
 | 
			
		||||
            {
 | 
			
		||||
                m_body->ApplyTorque(50.0f);
 | 
			
		||||
            }
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case 'd':
 | 
			
		||||
            {
 | 
			
		||||
                m_body->ApplyTorque(-50.0f);
 | 
			
		||||
            }
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        default:
 | 
			
		||||
            break;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new ApplyForce;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    b2Body* m_body;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef APPLY_FORCE_H
 | 
			
		||||
#define APPLY_FORCE_H
 | 
			
		||||
 | 
			
		||||
class ApplyForce : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
    ApplyForce()
 | 
			
		||||
    {
 | 
			
		||||
        m_world->SetGravity(b2Vec2(0.0f, 0.0f));
 | 
			
		||||
 | 
			
		||||
        const float32 k_restitution = 0.4f;
 | 
			
		||||
 | 
			
		||||
        b2Body* ground;
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.position.Set(0.0f, 20.0f);
 | 
			
		||||
            ground = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2EdgeShape shape;
 | 
			
		||||
 | 
			
		||||
            b2FixtureDef sd;
 | 
			
		||||
            sd.shape = &shape;
 | 
			
		||||
            sd.density = 0.0f;
 | 
			
		||||
            sd.restitution = k_restitution;
 | 
			
		||||
 | 
			
		||||
            // Left vertical
 | 
			
		||||
            shape.Set(b2Vec2(-20.0f, -20.0f), b2Vec2(-20.0f, 20.0f));
 | 
			
		||||
            ground->CreateFixture(&sd);
 | 
			
		||||
 | 
			
		||||
            // Right vertical
 | 
			
		||||
            shape.Set(b2Vec2(20.0f, -20.0f), b2Vec2(20.0f, 20.0f));
 | 
			
		||||
            ground->CreateFixture(&sd);
 | 
			
		||||
 | 
			
		||||
            // Top horizontal
 | 
			
		||||
            shape.Set(b2Vec2(-20.0f, 20.0f), b2Vec2(20.0f, 20.0f));
 | 
			
		||||
            ground->CreateFixture(&sd);
 | 
			
		||||
 | 
			
		||||
            // Bottom horizontal
 | 
			
		||||
            shape.Set(b2Vec2(-20.0f, -20.0f), b2Vec2(20.0f, -20.0f));
 | 
			
		||||
            ground->CreateFixture(&sd);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2Transform xf1;
 | 
			
		||||
            xf1.q.Set(0.3524f * b2_pi);
 | 
			
		||||
            xf1.p = xf1.q.GetXAxis();
 | 
			
		||||
 | 
			
		||||
            b2Vec2 vertices[3];
 | 
			
		||||
            vertices[0] = b2Mul(xf1, b2Vec2(-1.0f, 0.0f));
 | 
			
		||||
            vertices[1] = b2Mul(xf1, b2Vec2(1.0f, 0.0f));
 | 
			
		||||
            vertices[2] = b2Mul(xf1, b2Vec2(0.0f, 0.5f));
 | 
			
		||||
 | 
			
		||||
            b2PolygonShape poly1;
 | 
			
		||||
            poly1.Set(vertices, 3);
 | 
			
		||||
 | 
			
		||||
            b2FixtureDef sd1;
 | 
			
		||||
            sd1.shape = &poly1;
 | 
			
		||||
            sd1.density = 4.0f;
 | 
			
		||||
 | 
			
		||||
            b2Transform xf2;
 | 
			
		||||
            xf2.q.Set(-0.3524f * b2_pi);
 | 
			
		||||
            xf2.p = -xf2.q.GetXAxis();
 | 
			
		||||
 | 
			
		||||
            vertices[0] = b2Mul(xf2, b2Vec2(-1.0f, 0.0f));
 | 
			
		||||
            vertices[1] = b2Mul(xf2, b2Vec2(1.0f, 0.0f));
 | 
			
		||||
            vertices[2] = b2Mul(xf2, b2Vec2(0.0f, 0.5f));
 | 
			
		||||
 | 
			
		||||
            b2PolygonShape poly2;
 | 
			
		||||
            poly2.Set(vertices, 3);
 | 
			
		||||
 | 
			
		||||
            b2FixtureDef sd2;
 | 
			
		||||
            sd2.shape = &poly2;
 | 
			
		||||
            sd2.density = 2.0f;
 | 
			
		||||
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
            bd.angularDamping = 5.0f;
 | 
			
		||||
            bd.linearDamping = 0.1f;
 | 
			
		||||
 | 
			
		||||
            bd.position.Set(0.0f, 2.0f);
 | 
			
		||||
            bd.angle = b2_pi;
 | 
			
		||||
            bd.allowSleep = false;
 | 
			
		||||
            m_body = m_world->CreateBody(&bd);
 | 
			
		||||
            m_body->CreateFixture(&sd1);
 | 
			
		||||
            m_body->CreateFixture(&sd2);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(0.5f, 0.5f);
 | 
			
		||||
 | 
			
		||||
            b2FixtureDef fd;
 | 
			
		||||
            fd.shape = &shape;
 | 
			
		||||
            fd.density = 1.0f;
 | 
			
		||||
            fd.friction = 0.3f;
 | 
			
		||||
 | 
			
		||||
            for (int i = 0; i < 10; ++i)
 | 
			
		||||
            {
 | 
			
		||||
                b2BodyDef bd;
 | 
			
		||||
                bd.type = b2_dynamicBody;
 | 
			
		||||
 | 
			
		||||
                bd.position.Set(0.0f, 5.0f + 1.54f * i);
 | 
			
		||||
                b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
                body->CreateFixture(&fd);
 | 
			
		||||
 | 
			
		||||
                float32 gravity = 10.0f;
 | 
			
		||||
                float32 I = body->GetInertia();
 | 
			
		||||
                float32 mass = body->GetMass();
 | 
			
		||||
 | 
			
		||||
                // For a circle: I = 0.5 * m * r * r ==> r = sqrt(2 * I / m)
 | 
			
		||||
                float32 radius = b2Sqrt(2.0f * I / mass);
 | 
			
		||||
 | 
			
		||||
                b2FrictionJointDef jd;
 | 
			
		||||
                jd.localAnchorA.SetZero();
 | 
			
		||||
                jd.localAnchorB.SetZero();
 | 
			
		||||
                jd.bodyA = ground;
 | 
			
		||||
                jd.bodyB = body;
 | 
			
		||||
                jd.collideConnected = true;
 | 
			
		||||
                jd.maxForce = mass * gravity;
 | 
			
		||||
                jd.maxTorque = mass * radius * gravity;
 | 
			
		||||
 | 
			
		||||
                m_world->CreateJoint(&jd);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Keyboard(unsigned char key)
 | 
			
		||||
    {
 | 
			
		||||
        switch (key)
 | 
			
		||||
        {
 | 
			
		||||
        case 'w':
 | 
			
		||||
            {
 | 
			
		||||
                b2Vec2 f = m_body->GetWorldVector(b2Vec2(0.0f, -200.0f));
 | 
			
		||||
                b2Vec2 p = m_body->GetWorldPoint(b2Vec2(0.0f, 2.0f));
 | 
			
		||||
                m_body->ApplyForce(f, p);
 | 
			
		||||
            }
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case 'a':
 | 
			
		||||
            {
 | 
			
		||||
                m_body->ApplyTorque(50.0f);
 | 
			
		||||
            }
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case 'd':
 | 
			
		||||
            {
 | 
			
		||||
                m_body->ApplyTorque(-50.0f);
 | 
			
		||||
            }
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        default:
 | 
			
		||||
            break;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new ApplyForce;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    b2Body* m_body;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -1,159 +1,159 @@
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef BODY_TYPES_H
 | 
			
		||||
#define BODY_TYPES_H
 | 
			
		||||
 | 
			
		||||
class BodyTypes : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
    BodyTypes()
 | 
			
		||||
    {
 | 
			
		||||
        b2Body* ground = NULL;
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            ground = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2EdgeShape shape;
 | 
			
		||||
            shape.Set(b2Vec2(-20.0f, 0.0f), b2Vec2(20.0f, 0.0f));
 | 
			
		||||
 | 
			
		||||
            b2FixtureDef fd;
 | 
			
		||||
            fd.shape = &shape;
 | 
			
		||||
 | 
			
		||||
            ground->CreateFixture(&fd);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Define attachment
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
            bd.position.Set(0.0f, 3.0f);
 | 
			
		||||
            m_attachment = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(0.5f, 2.0f);
 | 
			
		||||
            m_attachment->CreateFixture(&shape, 2.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Define platform
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
            bd.position.Set(-4.0f, 5.0f);
 | 
			
		||||
            m_platform = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(0.5f, 4.0f, b2Vec2(4.0f, 0.0f), 0.5f * b2_pi);
 | 
			
		||||
 | 
			
		||||
            b2FixtureDef fd;
 | 
			
		||||
            fd.shape = &shape;
 | 
			
		||||
            fd.friction = 0.6f;
 | 
			
		||||
            fd.density = 2.0f;
 | 
			
		||||
            m_platform->CreateFixture(&fd);
 | 
			
		||||
 | 
			
		||||
            b2RevoluteJointDef rjd;
 | 
			
		||||
            rjd.Initialize(m_attachment, m_platform, b2Vec2(0.0f, 5.0f));
 | 
			
		||||
            rjd.maxMotorTorque = 50.0f;
 | 
			
		||||
            rjd.enableMotor = true;
 | 
			
		||||
            m_world->CreateJoint(&rjd);
 | 
			
		||||
 | 
			
		||||
            b2PrismaticJointDef pjd;
 | 
			
		||||
            pjd.Initialize(ground, m_platform, b2Vec2(0.0f, 5.0f), b2Vec2(1.0f, 0.0f));
 | 
			
		||||
 | 
			
		||||
            pjd.maxMotorForce = 1000.0f;
 | 
			
		||||
            pjd.enableMotor = true;
 | 
			
		||||
            pjd.lowerTranslation = -10.0f;
 | 
			
		||||
            pjd.upperTranslation = 10.0f;
 | 
			
		||||
            pjd.enableLimit = true;
 | 
			
		||||
 | 
			
		||||
            m_world->CreateJoint(&pjd);
 | 
			
		||||
 | 
			
		||||
            m_speed = 3.0f;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Create a payload
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
            bd.position.Set(0.0f, 8.0f);
 | 
			
		||||
            b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(0.75f, 0.75f);
 | 
			
		||||
 | 
			
		||||
            b2FixtureDef fd;
 | 
			
		||||
            fd.shape = &shape;
 | 
			
		||||
            fd.friction = 0.6f;
 | 
			
		||||
            fd.density = 2.0f;
 | 
			
		||||
 | 
			
		||||
            body->CreateFixture(&fd);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Keyboard(unsigned char key)
 | 
			
		||||
    {
 | 
			
		||||
        switch (key)
 | 
			
		||||
        {
 | 
			
		||||
        case 'd':
 | 
			
		||||
            m_platform->SetType(b2_dynamicBody);
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case 's':
 | 
			
		||||
            m_platform->SetType(b2_staticBody);
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case 'k':
 | 
			
		||||
            m_platform->SetType(b2_kinematicBody);
 | 
			
		||||
            m_platform->SetLinearVelocity(b2Vec2(-m_speed, 0.0f));
 | 
			
		||||
            m_platform->SetAngularVelocity(0.0f);
 | 
			
		||||
            break;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Step(Settings* settings)
 | 
			
		||||
    {
 | 
			
		||||
        // Drive the kinematic body.
 | 
			
		||||
        if (m_platform->GetType() == b2_kinematicBody)
 | 
			
		||||
        {
 | 
			
		||||
            b2Vec2 p = m_platform->GetTransform().p;
 | 
			
		||||
            b2Vec2 v = m_platform->GetLinearVelocity();
 | 
			
		||||
 | 
			
		||||
            if ((p.x < -10.0f && v.x < 0.0f) ||
 | 
			
		||||
                (p.x > 10.0f && v.x > 0.0f))
 | 
			
		||||
            {
 | 
			
		||||
                v.x = -v.x;
 | 
			
		||||
                m_platform->SetLinearVelocity(v);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        Test::Step(settings);
 | 
			
		||||
        m_debugDraw.DrawString(5, m_textLine, "Keys: (d) dynamic, (s) static, (k) kinematic");
 | 
			
		||||
        m_textLine += 15;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new BodyTypes;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    b2Body* m_attachment;
 | 
			
		||||
    b2Body* m_platform;
 | 
			
		||||
    float32 m_speed;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef BODY_TYPES_H
 | 
			
		||||
#define BODY_TYPES_H
 | 
			
		||||
 | 
			
		||||
class BodyTypes : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
    BodyTypes()
 | 
			
		||||
    {
 | 
			
		||||
        b2Body* ground = NULL;
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            ground = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2EdgeShape shape;
 | 
			
		||||
            shape.Set(b2Vec2(-20.0f, 0.0f), b2Vec2(20.0f, 0.0f));
 | 
			
		||||
 | 
			
		||||
            b2FixtureDef fd;
 | 
			
		||||
            fd.shape = &shape;
 | 
			
		||||
 | 
			
		||||
            ground->CreateFixture(&fd);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Define attachment
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
            bd.position.Set(0.0f, 3.0f);
 | 
			
		||||
            m_attachment = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(0.5f, 2.0f);
 | 
			
		||||
            m_attachment->CreateFixture(&shape, 2.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Define platform
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
            bd.position.Set(-4.0f, 5.0f);
 | 
			
		||||
            m_platform = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(0.5f, 4.0f, b2Vec2(4.0f, 0.0f), 0.5f * b2_pi);
 | 
			
		||||
 | 
			
		||||
            b2FixtureDef fd;
 | 
			
		||||
            fd.shape = &shape;
 | 
			
		||||
            fd.friction = 0.6f;
 | 
			
		||||
            fd.density = 2.0f;
 | 
			
		||||
            m_platform->CreateFixture(&fd);
 | 
			
		||||
 | 
			
		||||
            b2RevoluteJointDef rjd;
 | 
			
		||||
            rjd.Initialize(m_attachment, m_platform, b2Vec2(0.0f, 5.0f));
 | 
			
		||||
            rjd.maxMotorTorque = 50.0f;
 | 
			
		||||
            rjd.enableMotor = true;
 | 
			
		||||
            m_world->CreateJoint(&rjd);
 | 
			
		||||
 | 
			
		||||
            b2PrismaticJointDef pjd;
 | 
			
		||||
            pjd.Initialize(ground, m_platform, b2Vec2(0.0f, 5.0f), b2Vec2(1.0f, 0.0f));
 | 
			
		||||
 | 
			
		||||
            pjd.maxMotorForce = 1000.0f;
 | 
			
		||||
            pjd.enableMotor = true;
 | 
			
		||||
            pjd.lowerTranslation = -10.0f;
 | 
			
		||||
            pjd.upperTranslation = 10.0f;
 | 
			
		||||
            pjd.enableLimit = true;
 | 
			
		||||
 | 
			
		||||
            m_world->CreateJoint(&pjd);
 | 
			
		||||
 | 
			
		||||
            m_speed = 3.0f;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Create a payload
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
            bd.position.Set(0.0f, 8.0f);
 | 
			
		||||
            b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(0.75f, 0.75f);
 | 
			
		||||
 | 
			
		||||
            b2FixtureDef fd;
 | 
			
		||||
            fd.shape = &shape;
 | 
			
		||||
            fd.friction = 0.6f;
 | 
			
		||||
            fd.density = 2.0f;
 | 
			
		||||
 | 
			
		||||
            body->CreateFixture(&fd);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Keyboard(unsigned char key)
 | 
			
		||||
    {
 | 
			
		||||
        switch (key)
 | 
			
		||||
        {
 | 
			
		||||
        case 'd':
 | 
			
		||||
            m_platform->SetType(b2_dynamicBody);
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case 's':
 | 
			
		||||
            m_platform->SetType(b2_staticBody);
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case 'k':
 | 
			
		||||
            m_platform->SetType(b2_kinematicBody);
 | 
			
		||||
            m_platform->SetLinearVelocity(b2Vec2(-m_speed, 0.0f));
 | 
			
		||||
            m_platform->SetAngularVelocity(0.0f);
 | 
			
		||||
            break;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Step(Settings* settings)
 | 
			
		||||
    {
 | 
			
		||||
        // Drive the kinematic body.
 | 
			
		||||
        if (m_platform->GetType() == b2_kinematicBody)
 | 
			
		||||
        {
 | 
			
		||||
            b2Vec2 p = m_platform->GetTransform().p;
 | 
			
		||||
            b2Vec2 v = m_platform->GetLinearVelocity();
 | 
			
		||||
 | 
			
		||||
            if ((p.x < -10.0f && v.x < 0.0f) ||
 | 
			
		||||
                (p.x > 10.0f && v.x > 0.0f))
 | 
			
		||||
            {
 | 
			
		||||
                v.x = -v.x;
 | 
			
		||||
                m_platform->SetLinearVelocity(v);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        Test::Step(settings);
 | 
			
		||||
        m_debugDraw.DrawString(5, m_textLine, "Keys: (d) dynamic, (s) static, (k) kinematic");
 | 
			
		||||
        m_textLine += 15;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new BodyTypes;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    b2Body* m_attachment;
 | 
			
		||||
    b2Body* m_platform;
 | 
			
		||||
    float32 m_speed;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -1,155 +1,155 @@
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2008-2009 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef BREAKABLE_TEST_H
 | 
			
		||||
#define BREAKABLE_TEST_H
 | 
			
		||||
 | 
			
		||||
// This is used to test sensor shapes.
 | 
			
		||||
class Breakable : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
 | 
			
		||||
    enum
 | 
			
		||||
    {
 | 
			
		||||
        e_count = 7
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    Breakable()
 | 
			
		||||
    {
 | 
			
		||||
        // Ground body
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            b2Body* ground = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2EdgeShape shape;
 | 
			
		||||
            shape.Set(b2Vec2(-40.0f, 0.0f), b2Vec2(40.0f, 0.0f));
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Breakable dynamic body
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
            bd.position.Set(0.0f, 40.0f);
 | 
			
		||||
            bd.angle = 0.25f * b2_pi;
 | 
			
		||||
            m_body1 = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            m_shape1.SetAsBox(0.5f, 0.5f, b2Vec2(-0.5f, 0.0f), 0.0f);
 | 
			
		||||
            m_piece1 = m_body1->CreateFixture(&m_shape1, 1.0f);
 | 
			
		||||
 | 
			
		||||
            m_shape2.SetAsBox(0.5f, 0.5f, b2Vec2(0.5f, 0.0f), 0.0f);
 | 
			
		||||
            m_piece2 = m_body1->CreateFixture(&m_shape2, 1.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        m_break = false;
 | 
			
		||||
        m_broke = false;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void PostSolve(b2Contact* contact, const b2ContactImpulse* impulse)
 | 
			
		||||
    {
 | 
			
		||||
        if (m_broke)
 | 
			
		||||
        {
 | 
			
		||||
            // The body already broke.
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Should the body break?
 | 
			
		||||
        int32 count = contact->GetManifold()->pointCount;
 | 
			
		||||
 | 
			
		||||
        float32 maxImpulse = 0.0f;
 | 
			
		||||
        for (int32 i = 0; i < count; ++i)
 | 
			
		||||
        {
 | 
			
		||||
            maxImpulse = b2Max(maxImpulse, impulse->normalImpulses[i]);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (maxImpulse > 40.0f)
 | 
			
		||||
        {
 | 
			
		||||
            // Flag the body for breaking.
 | 
			
		||||
            m_break = true;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Break()
 | 
			
		||||
    {
 | 
			
		||||
        // Create two bodies from one.
 | 
			
		||||
        b2Body* body1 = m_piece1->GetBody();
 | 
			
		||||
        b2Vec2 center = body1->GetWorldCenter();
 | 
			
		||||
 | 
			
		||||
        body1->DestroyFixture(m_piece2);
 | 
			
		||||
        m_piece2 = NULL;
 | 
			
		||||
 | 
			
		||||
        b2BodyDef bd;
 | 
			
		||||
        bd.type = b2_dynamicBody;
 | 
			
		||||
        bd.position = body1->GetPosition();
 | 
			
		||||
        bd.angle = body1->GetAngle();
 | 
			
		||||
 | 
			
		||||
        b2Body* body2 = m_world->CreateBody(&bd);
 | 
			
		||||
        m_piece2 = body2->CreateFixture(&m_shape2, 1.0f);
 | 
			
		||||
 | 
			
		||||
        // Compute consistent velocities for new bodies based on
 | 
			
		||||
        // cached velocity.
 | 
			
		||||
        b2Vec2 center1 = body1->GetWorldCenter();
 | 
			
		||||
        b2Vec2 center2 = body2->GetWorldCenter();
 | 
			
		||||
 | 
			
		||||
        b2Vec2 velocity1 = m_velocity + b2Cross(m_angularVelocity, center1 - center);
 | 
			
		||||
        b2Vec2 velocity2 = m_velocity + b2Cross(m_angularVelocity, center2 - center);
 | 
			
		||||
 | 
			
		||||
        body1->SetAngularVelocity(m_angularVelocity);
 | 
			
		||||
        body1->SetLinearVelocity(velocity1);
 | 
			
		||||
 | 
			
		||||
        body2->SetAngularVelocity(m_angularVelocity);
 | 
			
		||||
        body2->SetLinearVelocity(velocity2);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Step(Settings* settings)
 | 
			
		||||
    {
 | 
			
		||||
        if (m_break)
 | 
			
		||||
        {
 | 
			
		||||
            Break();
 | 
			
		||||
            m_broke = true;
 | 
			
		||||
            m_break = false;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Cache velocities to improve movement on breakage.
 | 
			
		||||
        if (m_broke == false)
 | 
			
		||||
        {
 | 
			
		||||
            m_velocity = m_body1->GetLinearVelocity();
 | 
			
		||||
            m_angularVelocity = m_body1->GetAngularVelocity();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        Test::Step(settings);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new Breakable;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    b2Body* m_body1;
 | 
			
		||||
    b2Vec2 m_velocity;
 | 
			
		||||
    float32 m_angularVelocity;
 | 
			
		||||
    b2PolygonShape m_shape1;
 | 
			
		||||
    b2PolygonShape m_shape2;
 | 
			
		||||
    b2Fixture* m_piece1;
 | 
			
		||||
    b2Fixture* m_piece2;
 | 
			
		||||
 | 
			
		||||
    bool m_broke;
 | 
			
		||||
    bool m_break;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2008-2009 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef BREAKABLE_TEST_H
 | 
			
		||||
#define BREAKABLE_TEST_H
 | 
			
		||||
 | 
			
		||||
// This is used to test sensor shapes.
 | 
			
		||||
class Breakable : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
 | 
			
		||||
    enum
 | 
			
		||||
    {
 | 
			
		||||
        e_count = 7
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    Breakable()
 | 
			
		||||
    {
 | 
			
		||||
        // Ground body
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            b2Body* ground = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2EdgeShape shape;
 | 
			
		||||
            shape.Set(b2Vec2(-40.0f, 0.0f), b2Vec2(40.0f, 0.0f));
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Breakable dynamic body
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
            bd.position.Set(0.0f, 40.0f);
 | 
			
		||||
            bd.angle = 0.25f * b2_pi;
 | 
			
		||||
            m_body1 = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            m_shape1.SetAsBox(0.5f, 0.5f, b2Vec2(-0.5f, 0.0f), 0.0f);
 | 
			
		||||
            m_piece1 = m_body1->CreateFixture(&m_shape1, 1.0f);
 | 
			
		||||
 | 
			
		||||
            m_shape2.SetAsBox(0.5f, 0.5f, b2Vec2(0.5f, 0.0f), 0.0f);
 | 
			
		||||
            m_piece2 = m_body1->CreateFixture(&m_shape2, 1.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        m_break = false;
 | 
			
		||||
        m_broke = false;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void PostSolve(b2Contact* contact, const b2ContactImpulse* impulse)
 | 
			
		||||
    {
 | 
			
		||||
        if (m_broke)
 | 
			
		||||
        {
 | 
			
		||||
            // The body already broke.
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Should the body break?
 | 
			
		||||
        int32 count = contact->GetManifold()->pointCount;
 | 
			
		||||
 | 
			
		||||
        float32 maxImpulse = 0.0f;
 | 
			
		||||
        for (int32 i = 0; i < count; ++i)
 | 
			
		||||
        {
 | 
			
		||||
            maxImpulse = b2Max(maxImpulse, impulse->normalImpulses[i]);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (maxImpulse > 40.0f)
 | 
			
		||||
        {
 | 
			
		||||
            // Flag the body for breaking.
 | 
			
		||||
            m_break = true;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Break()
 | 
			
		||||
    {
 | 
			
		||||
        // Create two bodies from one.
 | 
			
		||||
        b2Body* body1 = m_piece1->GetBody();
 | 
			
		||||
        b2Vec2 center = body1->GetWorldCenter();
 | 
			
		||||
 | 
			
		||||
        body1->DestroyFixture(m_piece2);
 | 
			
		||||
        m_piece2 = NULL;
 | 
			
		||||
 | 
			
		||||
        b2BodyDef bd;
 | 
			
		||||
        bd.type = b2_dynamicBody;
 | 
			
		||||
        bd.position = body1->GetPosition();
 | 
			
		||||
        bd.angle = body1->GetAngle();
 | 
			
		||||
 | 
			
		||||
        b2Body* body2 = m_world->CreateBody(&bd);
 | 
			
		||||
        m_piece2 = body2->CreateFixture(&m_shape2, 1.0f);
 | 
			
		||||
 | 
			
		||||
        // Compute consistent velocities for new bodies based on
 | 
			
		||||
        // cached velocity.
 | 
			
		||||
        b2Vec2 center1 = body1->GetWorldCenter();
 | 
			
		||||
        b2Vec2 center2 = body2->GetWorldCenter();
 | 
			
		||||
 | 
			
		||||
        b2Vec2 velocity1 = m_velocity + b2Cross(m_angularVelocity, center1 - center);
 | 
			
		||||
        b2Vec2 velocity2 = m_velocity + b2Cross(m_angularVelocity, center2 - center);
 | 
			
		||||
 | 
			
		||||
        body1->SetAngularVelocity(m_angularVelocity);
 | 
			
		||||
        body1->SetLinearVelocity(velocity1);
 | 
			
		||||
 | 
			
		||||
        body2->SetAngularVelocity(m_angularVelocity);
 | 
			
		||||
        body2->SetLinearVelocity(velocity2);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Step(Settings* settings)
 | 
			
		||||
    {
 | 
			
		||||
        if (m_break)
 | 
			
		||||
        {
 | 
			
		||||
            Break();
 | 
			
		||||
            m_broke = true;
 | 
			
		||||
            m_break = false;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Cache velocities to improve movement on breakage.
 | 
			
		||||
        if (m_broke == false)
 | 
			
		||||
        {
 | 
			
		||||
            m_velocity = m_body1->GetLinearVelocity();
 | 
			
		||||
            m_angularVelocity = m_body1->GetAngularVelocity();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        Test::Step(settings);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new Breakable;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    b2Body* m_body1;
 | 
			
		||||
    b2Vec2 m_velocity;
 | 
			
		||||
    float32 m_angularVelocity;
 | 
			
		||||
    b2PolygonShape m_shape1;
 | 
			
		||||
    b2PolygonShape m_shape2;
 | 
			
		||||
    b2Fixture* m_piece1;
 | 
			
		||||
    b2Fixture* m_piece2;
 | 
			
		||||
 | 
			
		||||
    bool m_broke;
 | 
			
		||||
    bool m_break;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -1,125 +1,125 @@
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef BRIDGE_H
 | 
			
		||||
#define BRIDGE_H
 | 
			
		||||
 | 
			
		||||
class Bridge : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
 | 
			
		||||
    enum
 | 
			
		||||
    {
 | 
			
		||||
        e_count = 30
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    Bridge()
 | 
			
		||||
    {
 | 
			
		||||
        b2Body* ground = NULL;
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            ground = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2EdgeShape shape;
 | 
			
		||||
            shape.Set(b2Vec2(-40.0f, 0.0f), b2Vec2(40.0f, 0.0f));
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(0.5f, 0.125f);
 | 
			
		||||
 | 
			
		||||
            b2FixtureDef fd;
 | 
			
		||||
            fd.shape = &shape;
 | 
			
		||||
            fd.density = 20.0f;
 | 
			
		||||
            fd.friction = 0.2f;
 | 
			
		||||
 | 
			
		||||
            b2RevoluteJointDef jd;
 | 
			
		||||
 | 
			
		||||
            b2Body* prevBody = ground;
 | 
			
		||||
            for (int32 i = 0; i < e_count; ++i)
 | 
			
		||||
            {
 | 
			
		||||
                b2BodyDef bd;
 | 
			
		||||
                bd.type = b2_dynamicBody;
 | 
			
		||||
                bd.position.Set(-14.5f + 1.0f * i, 5.0f);
 | 
			
		||||
                b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
                body->CreateFixture(&fd);
 | 
			
		||||
 | 
			
		||||
                b2Vec2 anchor(-15.0f + 1.0f * i, 5.0f);
 | 
			
		||||
                jd.Initialize(prevBody, body, anchor);
 | 
			
		||||
                m_world->CreateJoint(&jd);
 | 
			
		||||
 | 
			
		||||
                if (i == (e_count >> 1))
 | 
			
		||||
                {
 | 
			
		||||
                    m_middle = body;
 | 
			
		||||
                }
 | 
			
		||||
                prevBody = body;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            b2Vec2 anchor(-15.0f + 1.0f * e_count, 5.0f);
 | 
			
		||||
            jd.Initialize(prevBody, ground, anchor);
 | 
			
		||||
            m_world->CreateJoint(&jd);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        for (int32 i = 0; i < 2; ++i)
 | 
			
		||||
        {
 | 
			
		||||
            b2Vec2 vertices[3];
 | 
			
		||||
            vertices[0].Set(-0.5f, 0.0f);
 | 
			
		||||
            vertices[1].Set(0.5f, 0.0f);
 | 
			
		||||
            vertices[2].Set(0.0f, 1.5f);
 | 
			
		||||
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.Set(vertices, 3);
 | 
			
		||||
 | 
			
		||||
            b2FixtureDef fd;
 | 
			
		||||
            fd.shape = &shape;
 | 
			
		||||
            fd.density = 1.0f;
 | 
			
		||||
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
            bd.position.Set(-8.0f + 8.0f * i, 12.0f);
 | 
			
		||||
            b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
            body->CreateFixture(&fd);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        for (int32 i = 0; i < 3; ++i)
 | 
			
		||||
        {
 | 
			
		||||
            b2CircleShape shape;
 | 
			
		||||
            shape.m_radius = 0.5f;
 | 
			
		||||
 | 
			
		||||
            b2FixtureDef fd;
 | 
			
		||||
            fd.shape = &shape;
 | 
			
		||||
            fd.density = 1.0f;
 | 
			
		||||
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
            bd.position.Set(-6.0f + 6.0f * i, 10.0f);
 | 
			
		||||
            b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
            body->CreateFixture(&fd);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new Bridge;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    b2Body* m_middle;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef BRIDGE_H
 | 
			
		||||
#define BRIDGE_H
 | 
			
		||||
 | 
			
		||||
class Bridge : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
 | 
			
		||||
    enum
 | 
			
		||||
    {
 | 
			
		||||
        e_count = 30
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    Bridge()
 | 
			
		||||
    {
 | 
			
		||||
        b2Body* ground = NULL;
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            ground = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2EdgeShape shape;
 | 
			
		||||
            shape.Set(b2Vec2(-40.0f, 0.0f), b2Vec2(40.0f, 0.0f));
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(0.5f, 0.125f);
 | 
			
		||||
 | 
			
		||||
            b2FixtureDef fd;
 | 
			
		||||
            fd.shape = &shape;
 | 
			
		||||
            fd.density = 20.0f;
 | 
			
		||||
            fd.friction = 0.2f;
 | 
			
		||||
 | 
			
		||||
            b2RevoluteJointDef jd;
 | 
			
		||||
 | 
			
		||||
            b2Body* prevBody = ground;
 | 
			
		||||
            for (int32 i = 0; i < e_count; ++i)
 | 
			
		||||
            {
 | 
			
		||||
                b2BodyDef bd;
 | 
			
		||||
                bd.type = b2_dynamicBody;
 | 
			
		||||
                bd.position.Set(-14.5f + 1.0f * i, 5.0f);
 | 
			
		||||
                b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
                body->CreateFixture(&fd);
 | 
			
		||||
 | 
			
		||||
                b2Vec2 anchor(-15.0f + 1.0f * i, 5.0f);
 | 
			
		||||
                jd.Initialize(prevBody, body, anchor);
 | 
			
		||||
                m_world->CreateJoint(&jd);
 | 
			
		||||
 | 
			
		||||
                if (i == (e_count >> 1))
 | 
			
		||||
                {
 | 
			
		||||
                    m_middle = body;
 | 
			
		||||
                }
 | 
			
		||||
                prevBody = body;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            b2Vec2 anchor(-15.0f + 1.0f * e_count, 5.0f);
 | 
			
		||||
            jd.Initialize(prevBody, ground, anchor);
 | 
			
		||||
            m_world->CreateJoint(&jd);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        for (int32 i = 0; i < 2; ++i)
 | 
			
		||||
        {
 | 
			
		||||
            b2Vec2 vertices[3];
 | 
			
		||||
            vertices[0].Set(-0.5f, 0.0f);
 | 
			
		||||
            vertices[1].Set(0.5f, 0.0f);
 | 
			
		||||
            vertices[2].Set(0.0f, 1.5f);
 | 
			
		||||
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.Set(vertices, 3);
 | 
			
		||||
 | 
			
		||||
            b2FixtureDef fd;
 | 
			
		||||
            fd.shape = &shape;
 | 
			
		||||
            fd.density = 1.0f;
 | 
			
		||||
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
            bd.position.Set(-8.0f + 8.0f * i, 12.0f);
 | 
			
		||||
            b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
            body->CreateFixture(&fd);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        for (int32 i = 0; i < 3; ++i)
 | 
			
		||||
        {
 | 
			
		||||
            b2CircleShape shape;
 | 
			
		||||
            shape.m_radius = 0.5f;
 | 
			
		||||
 | 
			
		||||
            b2FixtureDef fd;
 | 
			
		||||
            fd.shape = &shape;
 | 
			
		||||
            fd.density = 1.0f;
 | 
			
		||||
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
            bd.position.Set(-6.0f + 6.0f * i, 10.0f);
 | 
			
		||||
            b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
            body->CreateFixture(&fd);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new Bridge;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    b2Body* m_middle;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -1,136 +1,136 @@
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef BULLET_TEST_H
 | 
			
		||||
#define BULLET_TEST_H
 | 
			
		||||
 | 
			
		||||
class BulletTest : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
 | 
			
		||||
    BulletTest()
 | 
			
		||||
    {
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.position.Set(0.0f, 0.0f);
 | 
			
		||||
            b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2EdgeShape edge;
 | 
			
		||||
 | 
			
		||||
            edge.Set(b2Vec2(-10.0f, 0.0f), b2Vec2(10.0f, 0.0f));
 | 
			
		||||
            body->CreateFixture(&edge, 0.0f);
 | 
			
		||||
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(0.2f, 1.0f, b2Vec2(0.5f, 1.0f), 0.0f);
 | 
			
		||||
            body->CreateFixture(&shape, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
            bd.position.Set(0.0f, 4.0f);
 | 
			
		||||
 | 
			
		||||
            b2PolygonShape box;
 | 
			
		||||
            box.SetAsBox(2.0f, 0.1f);
 | 
			
		||||
 | 
			
		||||
            m_body = m_world->CreateBody(&bd);
 | 
			
		||||
            m_body->CreateFixture(&box, 1.0f);
 | 
			
		||||
 | 
			
		||||
            box.SetAsBox(0.25f, 0.25f);
 | 
			
		||||
 | 
			
		||||
            //m_x = RandomFloat(-1.0f, 1.0f);
 | 
			
		||||
            m_x = 0.20352793f;
 | 
			
		||||
            bd.position.Set(m_x, 10.0f);
 | 
			
		||||
            bd.bullet = true;
 | 
			
		||||
 | 
			
		||||
            m_bullet = m_world->CreateBody(&bd);
 | 
			
		||||
            m_bullet->CreateFixture(&box, 100.0f);
 | 
			
		||||
 | 
			
		||||
            m_bullet->SetLinearVelocity(b2Vec2(0.0f, -50.0f));
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Launch()
 | 
			
		||||
    {
 | 
			
		||||
        m_body->SetTransform(b2Vec2(0.0f, 4.0f), 0.0f);
 | 
			
		||||
        m_body->SetLinearVelocity(b2Vec2_zero);
 | 
			
		||||
        m_body->SetAngularVelocity(0.0f);
 | 
			
		||||
 | 
			
		||||
        m_x = RandomFloat(-1.0f, 1.0f);
 | 
			
		||||
        m_bullet->SetTransform(b2Vec2(m_x, 10.0f), 0.0f);
 | 
			
		||||
        m_bullet->SetLinearVelocity(b2Vec2(0.0f, -50.0f));
 | 
			
		||||
        m_bullet->SetAngularVelocity(0.0f);
 | 
			
		||||
 | 
			
		||||
        extern int32 b2_gjkCalls, b2_gjkIters, b2_gjkMaxIters;
 | 
			
		||||
        extern int32 b2_toiCalls, b2_toiIters, b2_toiMaxIters;
 | 
			
		||||
        extern int32 b2_toiRootIters, b2_toiMaxRootIters;
 | 
			
		||||
 | 
			
		||||
        b2_gjkCalls = 0;
 | 
			
		||||
        b2_gjkIters = 0;
 | 
			
		||||
        b2_gjkMaxIters = 0;
 | 
			
		||||
 | 
			
		||||
        b2_toiCalls = 0;
 | 
			
		||||
        b2_toiIters = 0;
 | 
			
		||||
        b2_toiMaxIters = 0;
 | 
			
		||||
        b2_toiRootIters = 0;
 | 
			
		||||
        b2_toiMaxRootIters = 0;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Step(Settings* settings)
 | 
			
		||||
    {
 | 
			
		||||
        Test::Step(settings);
 | 
			
		||||
 | 
			
		||||
        extern int32 b2_gjkCalls, b2_gjkIters, b2_gjkMaxIters;
 | 
			
		||||
        extern int32 b2_toiCalls, b2_toiIters;
 | 
			
		||||
        extern int32 b2_toiRootIters, b2_toiMaxRootIters;
 | 
			
		||||
 | 
			
		||||
        if (b2_gjkCalls > 0)
 | 
			
		||||
        {
 | 
			
		||||
            m_debugDraw.DrawString(5, m_textLine, "gjk calls = %d, ave gjk iters = %3.1f, max gjk iters = %d",
 | 
			
		||||
                b2_gjkCalls, b2_gjkIters / float32(b2_gjkCalls), b2_gjkMaxIters);
 | 
			
		||||
            m_textLine += 15;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (b2_toiCalls > 0)
 | 
			
		||||
        {
 | 
			
		||||
            m_debugDraw.DrawString(5, m_textLine, "toi calls = %d, ave toi iters = %3.1f, max toi iters = %d",
 | 
			
		||||
                b2_toiCalls, b2_toiIters / float32(b2_toiCalls), b2_toiMaxRootIters);
 | 
			
		||||
            m_textLine += 15;
 | 
			
		||||
 | 
			
		||||
            m_debugDraw.DrawString(5, m_textLine, "ave toi root iters = %3.1f, max toi root iters = %d",
 | 
			
		||||
                b2_toiRootIters / float32(b2_toiCalls), b2_toiMaxRootIters);
 | 
			
		||||
            m_textLine += 15;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (m_stepCount % 60 == 0)
 | 
			
		||||
        {
 | 
			
		||||
            Launch();
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new BulletTest;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    b2Body* m_body;
 | 
			
		||||
    b2Body* m_bullet;
 | 
			
		||||
    float32 m_x;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef BULLET_TEST_H
 | 
			
		||||
#define BULLET_TEST_H
 | 
			
		||||
 | 
			
		||||
class BulletTest : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
 | 
			
		||||
    BulletTest()
 | 
			
		||||
    {
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.position.Set(0.0f, 0.0f);
 | 
			
		||||
            b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2EdgeShape edge;
 | 
			
		||||
 | 
			
		||||
            edge.Set(b2Vec2(-10.0f, 0.0f), b2Vec2(10.0f, 0.0f));
 | 
			
		||||
            body->CreateFixture(&edge, 0.0f);
 | 
			
		||||
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(0.2f, 1.0f, b2Vec2(0.5f, 1.0f), 0.0f);
 | 
			
		||||
            body->CreateFixture(&shape, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
            bd.position.Set(0.0f, 4.0f);
 | 
			
		||||
 | 
			
		||||
            b2PolygonShape box;
 | 
			
		||||
            box.SetAsBox(2.0f, 0.1f);
 | 
			
		||||
 | 
			
		||||
            m_body = m_world->CreateBody(&bd);
 | 
			
		||||
            m_body->CreateFixture(&box, 1.0f);
 | 
			
		||||
 | 
			
		||||
            box.SetAsBox(0.25f, 0.25f);
 | 
			
		||||
 | 
			
		||||
            //m_x = RandomFloat(-1.0f, 1.0f);
 | 
			
		||||
            m_x = 0.20352793f;
 | 
			
		||||
            bd.position.Set(m_x, 10.0f);
 | 
			
		||||
            bd.bullet = true;
 | 
			
		||||
 | 
			
		||||
            m_bullet = m_world->CreateBody(&bd);
 | 
			
		||||
            m_bullet->CreateFixture(&box, 100.0f);
 | 
			
		||||
 | 
			
		||||
            m_bullet->SetLinearVelocity(b2Vec2(0.0f, -50.0f));
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Launch()
 | 
			
		||||
    {
 | 
			
		||||
        m_body->SetTransform(b2Vec2(0.0f, 4.0f), 0.0f);
 | 
			
		||||
        m_body->SetLinearVelocity(b2Vec2_zero);
 | 
			
		||||
        m_body->SetAngularVelocity(0.0f);
 | 
			
		||||
 | 
			
		||||
        m_x = RandomFloat(-1.0f, 1.0f);
 | 
			
		||||
        m_bullet->SetTransform(b2Vec2(m_x, 10.0f), 0.0f);
 | 
			
		||||
        m_bullet->SetLinearVelocity(b2Vec2(0.0f, -50.0f));
 | 
			
		||||
        m_bullet->SetAngularVelocity(0.0f);
 | 
			
		||||
 | 
			
		||||
        extern int32 b2_gjkCalls, b2_gjkIters, b2_gjkMaxIters;
 | 
			
		||||
        extern int32 b2_toiCalls, b2_toiIters, b2_toiMaxIters;
 | 
			
		||||
        extern int32 b2_toiRootIters, b2_toiMaxRootIters;
 | 
			
		||||
 | 
			
		||||
        b2_gjkCalls = 0;
 | 
			
		||||
        b2_gjkIters = 0;
 | 
			
		||||
        b2_gjkMaxIters = 0;
 | 
			
		||||
 | 
			
		||||
        b2_toiCalls = 0;
 | 
			
		||||
        b2_toiIters = 0;
 | 
			
		||||
        b2_toiMaxIters = 0;
 | 
			
		||||
        b2_toiRootIters = 0;
 | 
			
		||||
        b2_toiMaxRootIters = 0;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Step(Settings* settings)
 | 
			
		||||
    {
 | 
			
		||||
        Test::Step(settings);
 | 
			
		||||
 | 
			
		||||
        extern int32 b2_gjkCalls, b2_gjkIters, b2_gjkMaxIters;
 | 
			
		||||
        extern int32 b2_toiCalls, b2_toiIters;
 | 
			
		||||
        extern int32 b2_toiRootIters, b2_toiMaxRootIters;
 | 
			
		||||
 | 
			
		||||
        if (b2_gjkCalls > 0)
 | 
			
		||||
        {
 | 
			
		||||
            m_debugDraw.DrawString(5, m_textLine, "gjk calls = %d, ave gjk iters = %3.1f, max gjk iters = %d",
 | 
			
		||||
                b2_gjkCalls, b2_gjkIters / float32(b2_gjkCalls), b2_gjkMaxIters);
 | 
			
		||||
            m_textLine += 15;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (b2_toiCalls > 0)
 | 
			
		||||
        {
 | 
			
		||||
            m_debugDraw.DrawString(5, m_textLine, "toi calls = %d, ave toi iters = %3.1f, max toi iters = %d",
 | 
			
		||||
                b2_toiCalls, b2_toiIters / float32(b2_toiCalls), b2_toiMaxRootIters);
 | 
			
		||||
            m_textLine += 15;
 | 
			
		||||
 | 
			
		||||
            m_debugDraw.DrawString(5, m_textLine, "ave toi root iters = %3.1f, max toi root iters = %d",
 | 
			
		||||
                b2_toiRootIters / float32(b2_toiCalls), b2_toiMaxRootIters);
 | 
			
		||||
            m_textLine += 15;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (m_stepCount % 60 == 0)
 | 
			
		||||
        {
 | 
			
		||||
            Launch();
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new BulletTest;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    b2Body* m_body;
 | 
			
		||||
    b2Body* m_bullet;
 | 
			
		||||
    float32 m_x;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -1,211 +1,211 @@
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2006-2011 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef CANTILEVER_H
 | 
			
		||||
#define CANTILEVER_H
 | 
			
		||||
 | 
			
		||||
// It is difficult to make a cantilever made of links completely rigid with weld joints.
 | 
			
		||||
// You will have to use a high number of iterations to make them stiff.
 | 
			
		||||
// So why not go ahead and use soft weld joints? They behave like a revolute
 | 
			
		||||
// joint with a rotational spring.
 | 
			
		||||
class Cantilever : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
 | 
			
		||||
    enum
 | 
			
		||||
    {
 | 
			
		||||
        e_count = 8
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    Cantilever()
 | 
			
		||||
    {
 | 
			
		||||
        b2Body* ground = NULL;
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            ground = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2EdgeShape shape;
 | 
			
		||||
            shape.Set(b2Vec2(-40.0f, 0.0f), b2Vec2(40.0f, 0.0f));
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(0.5f, 0.125f);
 | 
			
		||||
 | 
			
		||||
            b2FixtureDef fd;
 | 
			
		||||
            fd.shape = &shape;
 | 
			
		||||
            fd.density = 20.0f;
 | 
			
		||||
 | 
			
		||||
            b2WeldJointDef jd;
 | 
			
		||||
 | 
			
		||||
            b2Body* prevBody = ground;
 | 
			
		||||
            for (int32 i = 0; i < e_count; ++i)
 | 
			
		||||
            {
 | 
			
		||||
                b2BodyDef bd;
 | 
			
		||||
                bd.type = b2_dynamicBody;
 | 
			
		||||
                bd.position.Set(-14.5f + 1.0f * i, 5.0f);
 | 
			
		||||
                b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
                body->CreateFixture(&fd);
 | 
			
		||||
 | 
			
		||||
                b2Vec2 anchor(-15.0f + 1.0f * i, 5.0f);
 | 
			
		||||
                jd.Initialize(prevBody, body, anchor);
 | 
			
		||||
                m_world->CreateJoint(&jd);
 | 
			
		||||
 | 
			
		||||
                prevBody = body;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(1.0f, 0.125f);
 | 
			
		||||
 | 
			
		||||
            b2FixtureDef fd;
 | 
			
		||||
            fd.shape = &shape;
 | 
			
		||||
            fd.density = 20.0f;
 | 
			
		||||
 | 
			
		||||
            b2WeldJointDef jd;
 | 
			
		||||
            jd.frequencyHz = 5.0f;
 | 
			
		||||
            jd.dampingRatio = 0.7f;
 | 
			
		||||
 | 
			
		||||
            b2Body* prevBody = ground;
 | 
			
		||||
            for (int32 i = 0; i < 3; ++i)
 | 
			
		||||
            {
 | 
			
		||||
                b2BodyDef bd;
 | 
			
		||||
                bd.type = b2_dynamicBody;
 | 
			
		||||
                bd.position.Set(-14.0f + 2.0f * i, 15.0f);
 | 
			
		||||
                b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
                body->CreateFixture(&fd);
 | 
			
		||||
 | 
			
		||||
                b2Vec2 anchor(-15.0f + 2.0f * i, 15.0f);
 | 
			
		||||
                jd.Initialize(prevBody, body, anchor);
 | 
			
		||||
                m_world->CreateJoint(&jd);
 | 
			
		||||
 | 
			
		||||
                prevBody = body;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(0.5f, 0.125f);
 | 
			
		||||
 | 
			
		||||
            b2FixtureDef fd;
 | 
			
		||||
            fd.shape = &shape;
 | 
			
		||||
            fd.density = 20.0f;
 | 
			
		||||
 | 
			
		||||
            b2WeldJointDef jd;
 | 
			
		||||
 | 
			
		||||
            b2Body* prevBody = ground;
 | 
			
		||||
            for (int32 i = 0; i < e_count; ++i)
 | 
			
		||||
            {
 | 
			
		||||
                b2BodyDef bd;
 | 
			
		||||
                bd.type = b2_dynamicBody;
 | 
			
		||||
                bd.position.Set(-4.5f + 1.0f * i, 5.0f);
 | 
			
		||||
                b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
                body->CreateFixture(&fd);
 | 
			
		||||
 | 
			
		||||
                if (i > 0)
 | 
			
		||||
                {
 | 
			
		||||
                    b2Vec2 anchor(-5.0f + 1.0f * i, 5.0f);
 | 
			
		||||
                    jd.Initialize(prevBody, body, anchor);
 | 
			
		||||
                    m_world->CreateJoint(&jd);
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                prevBody = body;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(0.5f, 0.125f);
 | 
			
		||||
 | 
			
		||||
            b2FixtureDef fd;
 | 
			
		||||
            fd.shape = &shape;
 | 
			
		||||
            fd.density = 20.0f;
 | 
			
		||||
 | 
			
		||||
            b2WeldJointDef jd;
 | 
			
		||||
            jd.frequencyHz = 8.0f;
 | 
			
		||||
            jd.dampingRatio = 0.7f;
 | 
			
		||||
 | 
			
		||||
            b2Body* prevBody = ground;
 | 
			
		||||
            for (int32 i = 0; i < e_count; ++i)
 | 
			
		||||
            {
 | 
			
		||||
                b2BodyDef bd;
 | 
			
		||||
                bd.type = b2_dynamicBody;
 | 
			
		||||
                bd.position.Set(5.5f + 1.0f * i, 10.0f);
 | 
			
		||||
                b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
                body->CreateFixture(&fd);
 | 
			
		||||
 | 
			
		||||
                if (i > 0)
 | 
			
		||||
                {
 | 
			
		||||
                    b2Vec2 anchor(5.0f + 1.0f * i, 10.0f);
 | 
			
		||||
                    jd.Initialize(prevBody, body, anchor);
 | 
			
		||||
                    m_world->CreateJoint(&jd);
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                prevBody = body;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        for (int32 i = 0; i < 2; ++i)
 | 
			
		||||
        {
 | 
			
		||||
            b2Vec2 vertices[3];
 | 
			
		||||
            vertices[0].Set(-0.5f, 0.0f);
 | 
			
		||||
            vertices[1].Set(0.5f, 0.0f);
 | 
			
		||||
            vertices[2].Set(0.0f, 1.5f);
 | 
			
		||||
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.Set(vertices, 3);
 | 
			
		||||
 | 
			
		||||
            b2FixtureDef fd;
 | 
			
		||||
            fd.shape = &shape;
 | 
			
		||||
            fd.density = 1.0f;
 | 
			
		||||
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
            bd.position.Set(-8.0f + 8.0f * i, 12.0f);
 | 
			
		||||
            b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
            body->CreateFixture(&fd);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        for (int32 i = 0; i < 2; ++i)
 | 
			
		||||
        {
 | 
			
		||||
            b2CircleShape shape;
 | 
			
		||||
            shape.m_radius = 0.5f;
 | 
			
		||||
 | 
			
		||||
            b2FixtureDef fd;
 | 
			
		||||
            fd.shape = &shape;
 | 
			
		||||
            fd.density = 1.0f;
 | 
			
		||||
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
            bd.position.Set(-6.0f + 6.0f * i, 10.0f);
 | 
			
		||||
            b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
            body->CreateFixture(&fd);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new Cantilever;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    b2Body* m_middle;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2006-2011 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef CANTILEVER_H
 | 
			
		||||
#define CANTILEVER_H
 | 
			
		||||
 | 
			
		||||
// It is difficult to make a cantilever made of links completely rigid with weld joints.
 | 
			
		||||
// You will have to use a high number of iterations to make them stiff.
 | 
			
		||||
// So why not go ahead and use soft weld joints? They behave like a revolute
 | 
			
		||||
// joint with a rotational spring.
 | 
			
		||||
class Cantilever : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
 | 
			
		||||
    enum
 | 
			
		||||
    {
 | 
			
		||||
        e_count = 8
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    Cantilever()
 | 
			
		||||
    {
 | 
			
		||||
        b2Body* ground = NULL;
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            ground = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2EdgeShape shape;
 | 
			
		||||
            shape.Set(b2Vec2(-40.0f, 0.0f), b2Vec2(40.0f, 0.0f));
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(0.5f, 0.125f);
 | 
			
		||||
 | 
			
		||||
            b2FixtureDef fd;
 | 
			
		||||
            fd.shape = &shape;
 | 
			
		||||
            fd.density = 20.0f;
 | 
			
		||||
 | 
			
		||||
            b2WeldJointDef jd;
 | 
			
		||||
 | 
			
		||||
            b2Body* prevBody = ground;
 | 
			
		||||
            for (int32 i = 0; i < e_count; ++i)
 | 
			
		||||
            {
 | 
			
		||||
                b2BodyDef bd;
 | 
			
		||||
                bd.type = b2_dynamicBody;
 | 
			
		||||
                bd.position.Set(-14.5f + 1.0f * i, 5.0f);
 | 
			
		||||
                b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
                body->CreateFixture(&fd);
 | 
			
		||||
 | 
			
		||||
                b2Vec2 anchor(-15.0f + 1.0f * i, 5.0f);
 | 
			
		||||
                jd.Initialize(prevBody, body, anchor);
 | 
			
		||||
                m_world->CreateJoint(&jd);
 | 
			
		||||
 | 
			
		||||
                prevBody = body;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(1.0f, 0.125f);
 | 
			
		||||
 | 
			
		||||
            b2FixtureDef fd;
 | 
			
		||||
            fd.shape = &shape;
 | 
			
		||||
            fd.density = 20.0f;
 | 
			
		||||
 | 
			
		||||
            b2WeldJointDef jd;
 | 
			
		||||
            jd.frequencyHz = 5.0f;
 | 
			
		||||
            jd.dampingRatio = 0.7f;
 | 
			
		||||
 | 
			
		||||
            b2Body* prevBody = ground;
 | 
			
		||||
            for (int32 i = 0; i < 3; ++i)
 | 
			
		||||
            {
 | 
			
		||||
                b2BodyDef bd;
 | 
			
		||||
                bd.type = b2_dynamicBody;
 | 
			
		||||
                bd.position.Set(-14.0f + 2.0f * i, 15.0f);
 | 
			
		||||
                b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
                body->CreateFixture(&fd);
 | 
			
		||||
 | 
			
		||||
                b2Vec2 anchor(-15.0f + 2.0f * i, 15.0f);
 | 
			
		||||
                jd.Initialize(prevBody, body, anchor);
 | 
			
		||||
                m_world->CreateJoint(&jd);
 | 
			
		||||
 | 
			
		||||
                prevBody = body;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(0.5f, 0.125f);
 | 
			
		||||
 | 
			
		||||
            b2FixtureDef fd;
 | 
			
		||||
            fd.shape = &shape;
 | 
			
		||||
            fd.density = 20.0f;
 | 
			
		||||
 | 
			
		||||
            b2WeldJointDef jd;
 | 
			
		||||
 | 
			
		||||
            b2Body* prevBody = ground;
 | 
			
		||||
            for (int32 i = 0; i < e_count; ++i)
 | 
			
		||||
            {
 | 
			
		||||
                b2BodyDef bd;
 | 
			
		||||
                bd.type = b2_dynamicBody;
 | 
			
		||||
                bd.position.Set(-4.5f + 1.0f * i, 5.0f);
 | 
			
		||||
                b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
                body->CreateFixture(&fd);
 | 
			
		||||
 | 
			
		||||
                if (i > 0)
 | 
			
		||||
                {
 | 
			
		||||
                    b2Vec2 anchor(-5.0f + 1.0f * i, 5.0f);
 | 
			
		||||
                    jd.Initialize(prevBody, body, anchor);
 | 
			
		||||
                    m_world->CreateJoint(&jd);
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                prevBody = body;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(0.5f, 0.125f);
 | 
			
		||||
 | 
			
		||||
            b2FixtureDef fd;
 | 
			
		||||
            fd.shape = &shape;
 | 
			
		||||
            fd.density = 20.0f;
 | 
			
		||||
 | 
			
		||||
            b2WeldJointDef jd;
 | 
			
		||||
            jd.frequencyHz = 8.0f;
 | 
			
		||||
            jd.dampingRatio = 0.7f;
 | 
			
		||||
 | 
			
		||||
            b2Body* prevBody = ground;
 | 
			
		||||
            for (int32 i = 0; i < e_count; ++i)
 | 
			
		||||
            {
 | 
			
		||||
                b2BodyDef bd;
 | 
			
		||||
                bd.type = b2_dynamicBody;
 | 
			
		||||
                bd.position.Set(5.5f + 1.0f * i, 10.0f);
 | 
			
		||||
                b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
                body->CreateFixture(&fd);
 | 
			
		||||
 | 
			
		||||
                if (i > 0)
 | 
			
		||||
                {
 | 
			
		||||
                    b2Vec2 anchor(5.0f + 1.0f * i, 10.0f);
 | 
			
		||||
                    jd.Initialize(prevBody, body, anchor);
 | 
			
		||||
                    m_world->CreateJoint(&jd);
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                prevBody = body;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        for (int32 i = 0; i < 2; ++i)
 | 
			
		||||
        {
 | 
			
		||||
            b2Vec2 vertices[3];
 | 
			
		||||
            vertices[0].Set(-0.5f, 0.0f);
 | 
			
		||||
            vertices[1].Set(0.5f, 0.0f);
 | 
			
		||||
            vertices[2].Set(0.0f, 1.5f);
 | 
			
		||||
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.Set(vertices, 3);
 | 
			
		||||
 | 
			
		||||
            b2FixtureDef fd;
 | 
			
		||||
            fd.shape = &shape;
 | 
			
		||||
            fd.density = 1.0f;
 | 
			
		||||
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
            bd.position.Set(-8.0f + 8.0f * i, 12.0f);
 | 
			
		||||
            b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
            body->CreateFixture(&fd);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        for (int32 i = 0; i < 2; ++i)
 | 
			
		||||
        {
 | 
			
		||||
            b2CircleShape shape;
 | 
			
		||||
            shape.m_radius = 0.5f;
 | 
			
		||||
 | 
			
		||||
            b2FixtureDef fd;
 | 
			
		||||
            fd.shape = &shape;
 | 
			
		||||
            fd.density = 1.0f;
 | 
			
		||||
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
            bd.position.Set(-6.0f + 6.0f * i, 10.0f);
 | 
			
		||||
            b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
            body->CreateFixture(&fd);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new Cantilever;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    b2Body* m_middle;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -1,286 +1,286 @@
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2006-2011 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef CAR_H
 | 
			
		||||
#define CAR_H
 | 
			
		||||
 | 
			
		||||
// This is a fun demo that shows off the wheel joint
 | 
			
		||||
class Car : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
    Car()
 | 
			
		||||
    {
 | 
			
		||||
        m_hz = 4.0f;
 | 
			
		||||
        m_zeta = 0.7f;
 | 
			
		||||
        m_speed = 50.0f;
 | 
			
		||||
 | 
			
		||||
        b2Body* ground = NULL;
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            ground = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2EdgeShape shape;
 | 
			
		||||
 | 
			
		||||
            b2FixtureDef fd;
 | 
			
		||||
            fd.shape = &shape;
 | 
			
		||||
            fd.density = 0.0f;
 | 
			
		||||
            fd.friction = 0.6f;
 | 
			
		||||
 | 
			
		||||
            shape.Set(b2Vec2(-20.0f, 0.0f), b2Vec2(20.0f, 0.0f));
 | 
			
		||||
            ground->CreateFixture(&fd);
 | 
			
		||||
 | 
			
		||||
            float32 hs[10] = {0.25f, 1.0f, 4.0f, 0.0f, 0.0f, -1.0f, -2.0f, -2.0f, -1.25f, 0.0f};
 | 
			
		||||
 | 
			
		||||
            float32 x = 20.0f, y1 = 0.0f, dx = 5.0f;
 | 
			
		||||
 | 
			
		||||
            for (int32 i = 0; i < 10; ++i)
 | 
			
		||||
            {
 | 
			
		||||
                float32 y2 = hs[i];
 | 
			
		||||
                shape.Set(b2Vec2(x, y1), b2Vec2(x + dx, y2));
 | 
			
		||||
                ground->CreateFixture(&fd);
 | 
			
		||||
                y1 = y2;
 | 
			
		||||
                x += dx;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            for (int32 i = 0; i < 10; ++i)
 | 
			
		||||
            {
 | 
			
		||||
                float32 y2 = hs[i];
 | 
			
		||||
                shape.Set(b2Vec2(x, y1), b2Vec2(x + dx, y2));
 | 
			
		||||
                ground->CreateFixture(&fd);
 | 
			
		||||
                y1 = y2;
 | 
			
		||||
                x += dx;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            shape.Set(b2Vec2(x, 0.0f), b2Vec2(x + 40.0f, 0.0f));
 | 
			
		||||
            ground->CreateFixture(&fd);
 | 
			
		||||
 | 
			
		||||
            x += 80.0f;
 | 
			
		||||
            shape.Set(b2Vec2(x, 0.0f), b2Vec2(x + 40.0f, 0.0f));
 | 
			
		||||
            ground->CreateFixture(&fd);
 | 
			
		||||
 | 
			
		||||
            x += 40.0f;
 | 
			
		||||
            shape.Set(b2Vec2(x, 0.0f), b2Vec2(x + 10.0f, 5.0f));
 | 
			
		||||
            ground->CreateFixture(&fd);
 | 
			
		||||
 | 
			
		||||
            x += 20.0f;
 | 
			
		||||
            shape.Set(b2Vec2(x, 0.0f), b2Vec2(x + 40.0f, 0.0f));
 | 
			
		||||
            ground->CreateFixture(&fd);
 | 
			
		||||
 | 
			
		||||
            x += 40.0f;
 | 
			
		||||
            shape.Set(b2Vec2(x, 0.0f), b2Vec2(x, 20.0f));
 | 
			
		||||
            ground->CreateFixture(&fd);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Teeter
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.position.Set(140.0f, 1.0f);
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
            b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2PolygonShape box;
 | 
			
		||||
            box.SetAsBox(10.0f, 0.25f);
 | 
			
		||||
            body->CreateFixture(&box, 1.0f);
 | 
			
		||||
 | 
			
		||||
            b2RevoluteJointDef jd;
 | 
			
		||||
            jd.Initialize(ground, body, body->GetPosition());
 | 
			
		||||
            jd.lowerAngle = -8.0f * b2_pi / 180.0f;
 | 
			
		||||
            jd.upperAngle = 8.0f * b2_pi / 180.0f;
 | 
			
		||||
            jd.enableLimit = true;
 | 
			
		||||
            m_world->CreateJoint(&jd);
 | 
			
		||||
 | 
			
		||||
            body->ApplyAngularImpulse(100.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Bridge
 | 
			
		||||
        {
 | 
			
		||||
            int32 N = 20;
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(1.0f, 0.125f);
 | 
			
		||||
 | 
			
		||||
            b2FixtureDef fd;
 | 
			
		||||
            fd.shape = &shape;
 | 
			
		||||
            fd.density = 1.0f;
 | 
			
		||||
            fd.friction = 0.6f;
 | 
			
		||||
 | 
			
		||||
            b2RevoluteJointDef jd;
 | 
			
		||||
 | 
			
		||||
            b2Body* prevBody = ground;
 | 
			
		||||
            for (int32 i = 0; i < N; ++i)
 | 
			
		||||
            {
 | 
			
		||||
                b2BodyDef bd;
 | 
			
		||||
                bd.type = b2_dynamicBody;
 | 
			
		||||
                bd.position.Set(161.0f + 2.0f * i, -0.125f);
 | 
			
		||||
                b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
                body->CreateFixture(&fd);
 | 
			
		||||
 | 
			
		||||
                b2Vec2 anchor(160.0f + 2.0f * i, -0.125f);
 | 
			
		||||
                jd.Initialize(prevBody, body, anchor);
 | 
			
		||||
                m_world->CreateJoint(&jd);
 | 
			
		||||
 | 
			
		||||
                prevBody = body;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            b2Vec2 anchor(160.0f + 2.0f * N, -0.125f);
 | 
			
		||||
            jd.Initialize(prevBody, ground, anchor);
 | 
			
		||||
            m_world->CreateJoint(&jd);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Boxes
 | 
			
		||||
        {
 | 
			
		||||
            b2PolygonShape box;
 | 
			
		||||
            box.SetAsBox(0.5f, 0.5f);
 | 
			
		||||
 | 
			
		||||
            b2Body* body = NULL;
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
 | 
			
		||||
            bd.position.Set(230.0f, 0.5f);
 | 
			
		||||
            body = m_world->CreateBody(&bd);
 | 
			
		||||
            body->CreateFixture(&box, 0.5f);
 | 
			
		||||
 | 
			
		||||
            bd.position.Set(230.0f, 1.5f);
 | 
			
		||||
            body = m_world->CreateBody(&bd);
 | 
			
		||||
            body->CreateFixture(&box, 0.5f);
 | 
			
		||||
 | 
			
		||||
            bd.position.Set(230.0f, 2.5f);
 | 
			
		||||
            body = m_world->CreateBody(&bd);
 | 
			
		||||
            body->CreateFixture(&box, 0.5f);
 | 
			
		||||
 | 
			
		||||
            bd.position.Set(230.0f, 3.5f);
 | 
			
		||||
            body = m_world->CreateBody(&bd);
 | 
			
		||||
            body->CreateFixture(&box, 0.5f);
 | 
			
		||||
 | 
			
		||||
            bd.position.Set(230.0f, 4.5f);
 | 
			
		||||
            body = m_world->CreateBody(&bd);
 | 
			
		||||
            body->CreateFixture(&box, 0.5f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Car
 | 
			
		||||
        {
 | 
			
		||||
            b2PolygonShape chassis;
 | 
			
		||||
            b2Vec2 vertices[8];
 | 
			
		||||
            vertices[0].Set(-1.5f, -0.5f);
 | 
			
		||||
            vertices[1].Set(1.5f, -0.5f);
 | 
			
		||||
            vertices[2].Set(1.5f, 0.0f);
 | 
			
		||||
            vertices[3].Set(0.0f, 0.9f);
 | 
			
		||||
            vertices[4].Set(-1.15f, 0.9f);
 | 
			
		||||
            vertices[5].Set(-1.5f, 0.2f);
 | 
			
		||||
            chassis.Set(vertices, 6);
 | 
			
		||||
 | 
			
		||||
            b2CircleShape circle;
 | 
			
		||||
            circle.m_radius = 0.4f;
 | 
			
		||||
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
            bd.position.Set(0.0f, 1.0f);
 | 
			
		||||
            m_car = m_world->CreateBody(&bd);
 | 
			
		||||
            m_car->CreateFixture(&chassis, 1.0f);
 | 
			
		||||
 | 
			
		||||
            b2FixtureDef fd;
 | 
			
		||||
            fd.shape = &circle;
 | 
			
		||||
            fd.density = 1.0f;
 | 
			
		||||
            fd.friction = 0.9f;
 | 
			
		||||
 | 
			
		||||
            bd.position.Set(-1.0f, 0.35f);
 | 
			
		||||
            m_wheel1 = m_world->CreateBody(&bd);
 | 
			
		||||
            m_wheel1->CreateFixture(&fd);
 | 
			
		||||
 | 
			
		||||
            bd.position.Set(1.0f, 0.4f);
 | 
			
		||||
            m_wheel2 = m_world->CreateBody(&bd);
 | 
			
		||||
            m_wheel2->CreateFixture(&fd);
 | 
			
		||||
 | 
			
		||||
            b2WheelJointDef jd;
 | 
			
		||||
            b2Vec2 axis(0.0f, 1.0f);
 | 
			
		||||
 | 
			
		||||
            jd.Initialize(m_car, m_wheel1, m_wheel1->GetPosition(), axis);
 | 
			
		||||
            jd.motorSpeed = 0.0f;
 | 
			
		||||
            jd.maxMotorTorque = 20.0f;
 | 
			
		||||
            jd.enableMotor = true;
 | 
			
		||||
            jd.frequencyHz = m_hz;
 | 
			
		||||
            jd.dampingRatio = m_zeta;
 | 
			
		||||
            m_spring1 = (b2WheelJoint*)m_world->CreateJoint(&jd);
 | 
			
		||||
 | 
			
		||||
            jd.Initialize(m_car, m_wheel2, m_wheel2->GetPosition(), axis);
 | 
			
		||||
            jd.motorSpeed = 0.0f;
 | 
			
		||||
            jd.maxMotorTorque = 10.0f;
 | 
			
		||||
            jd.enableMotor = false;
 | 
			
		||||
            jd.frequencyHz = m_hz;
 | 
			
		||||
            jd.dampingRatio = m_zeta;
 | 
			
		||||
            m_spring2 = (b2WheelJoint*)m_world->CreateJoint(&jd);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Keyboard(unsigned char key)
 | 
			
		||||
    {
 | 
			
		||||
        switch (key)
 | 
			
		||||
        {
 | 
			
		||||
        case 'a':
 | 
			
		||||
            m_spring1->SetMotorSpeed(m_speed);
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case 's':
 | 
			
		||||
            m_spring1->SetMotorSpeed(0.0f);
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case 'd':
 | 
			
		||||
            m_spring1->SetMotorSpeed(-m_speed);
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case 'q':
 | 
			
		||||
            m_hz = b2Max(0.0f, m_hz - 1.0f);
 | 
			
		||||
            m_spring1->SetSpringFrequencyHz(m_hz);
 | 
			
		||||
            m_spring2->SetSpringFrequencyHz(m_hz);
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case 'e':
 | 
			
		||||
            m_hz += 1.0f;
 | 
			
		||||
            m_spring1->SetSpringFrequencyHz(m_hz);
 | 
			
		||||
            m_spring2->SetSpringFrequencyHz(m_hz);
 | 
			
		||||
            break;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Step(Settings* settings)
 | 
			
		||||
    {
 | 
			
		||||
        m_debugDraw.DrawString(5, m_textLine, "Keys: left = a, brake = s, right = d, hz down = q, hz up = e");
 | 
			
		||||
        m_textLine += 15;
 | 
			
		||||
        m_debugDraw.DrawString(5, m_textLine, "frequency = %g hz, damping ratio = %g", m_hz, m_zeta);
 | 
			
		||||
        m_textLine += 15;
 | 
			
		||||
 | 
			
		||||
        settings->viewCenter.x = m_car->GetPosition().x;
 | 
			
		||||
        Test::Step(settings);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new Car;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    b2Body* m_car;
 | 
			
		||||
    b2Body* m_wheel1;
 | 
			
		||||
    b2Body* m_wheel2;
 | 
			
		||||
 | 
			
		||||
    float32 m_hz;
 | 
			
		||||
    float32 m_zeta;
 | 
			
		||||
    float32 m_speed;
 | 
			
		||||
    b2WheelJoint* m_spring1;
 | 
			
		||||
    b2WheelJoint* m_spring2;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2006-2011 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef CAR_H
 | 
			
		||||
#define CAR_H
 | 
			
		||||
 | 
			
		||||
// This is a fun demo that shows off the wheel joint
 | 
			
		||||
class Car : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
    Car()
 | 
			
		||||
    {
 | 
			
		||||
        m_hz = 4.0f;
 | 
			
		||||
        m_zeta = 0.7f;
 | 
			
		||||
        m_speed = 50.0f;
 | 
			
		||||
 | 
			
		||||
        b2Body* ground = NULL;
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            ground = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2EdgeShape shape;
 | 
			
		||||
 | 
			
		||||
            b2FixtureDef fd;
 | 
			
		||||
            fd.shape = &shape;
 | 
			
		||||
            fd.density = 0.0f;
 | 
			
		||||
            fd.friction = 0.6f;
 | 
			
		||||
 | 
			
		||||
            shape.Set(b2Vec2(-20.0f, 0.0f), b2Vec2(20.0f, 0.0f));
 | 
			
		||||
            ground->CreateFixture(&fd);
 | 
			
		||||
 | 
			
		||||
            float32 hs[10] = {0.25f, 1.0f, 4.0f, 0.0f, 0.0f, -1.0f, -2.0f, -2.0f, -1.25f, 0.0f};
 | 
			
		||||
 | 
			
		||||
            float32 x = 20.0f, y1 = 0.0f, dx = 5.0f;
 | 
			
		||||
 | 
			
		||||
            for (int32 i = 0; i < 10; ++i)
 | 
			
		||||
            {
 | 
			
		||||
                float32 y2 = hs[i];
 | 
			
		||||
                shape.Set(b2Vec2(x, y1), b2Vec2(x + dx, y2));
 | 
			
		||||
                ground->CreateFixture(&fd);
 | 
			
		||||
                y1 = y2;
 | 
			
		||||
                x += dx;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            for (int32 i = 0; i < 10; ++i)
 | 
			
		||||
            {
 | 
			
		||||
                float32 y2 = hs[i];
 | 
			
		||||
                shape.Set(b2Vec2(x, y1), b2Vec2(x + dx, y2));
 | 
			
		||||
                ground->CreateFixture(&fd);
 | 
			
		||||
                y1 = y2;
 | 
			
		||||
                x += dx;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            shape.Set(b2Vec2(x, 0.0f), b2Vec2(x + 40.0f, 0.0f));
 | 
			
		||||
            ground->CreateFixture(&fd);
 | 
			
		||||
 | 
			
		||||
            x += 80.0f;
 | 
			
		||||
            shape.Set(b2Vec2(x, 0.0f), b2Vec2(x + 40.0f, 0.0f));
 | 
			
		||||
            ground->CreateFixture(&fd);
 | 
			
		||||
 | 
			
		||||
            x += 40.0f;
 | 
			
		||||
            shape.Set(b2Vec2(x, 0.0f), b2Vec2(x + 10.0f, 5.0f));
 | 
			
		||||
            ground->CreateFixture(&fd);
 | 
			
		||||
 | 
			
		||||
            x += 20.0f;
 | 
			
		||||
            shape.Set(b2Vec2(x, 0.0f), b2Vec2(x + 40.0f, 0.0f));
 | 
			
		||||
            ground->CreateFixture(&fd);
 | 
			
		||||
 | 
			
		||||
            x += 40.0f;
 | 
			
		||||
            shape.Set(b2Vec2(x, 0.0f), b2Vec2(x, 20.0f));
 | 
			
		||||
            ground->CreateFixture(&fd);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Teeter
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.position.Set(140.0f, 1.0f);
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
            b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2PolygonShape box;
 | 
			
		||||
            box.SetAsBox(10.0f, 0.25f);
 | 
			
		||||
            body->CreateFixture(&box, 1.0f);
 | 
			
		||||
 | 
			
		||||
            b2RevoluteJointDef jd;
 | 
			
		||||
            jd.Initialize(ground, body, body->GetPosition());
 | 
			
		||||
            jd.lowerAngle = -8.0f * b2_pi / 180.0f;
 | 
			
		||||
            jd.upperAngle = 8.0f * b2_pi / 180.0f;
 | 
			
		||||
            jd.enableLimit = true;
 | 
			
		||||
            m_world->CreateJoint(&jd);
 | 
			
		||||
 | 
			
		||||
            body->ApplyAngularImpulse(100.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Bridge
 | 
			
		||||
        {
 | 
			
		||||
            int32 N = 20;
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(1.0f, 0.125f);
 | 
			
		||||
 | 
			
		||||
            b2FixtureDef fd;
 | 
			
		||||
            fd.shape = &shape;
 | 
			
		||||
            fd.density = 1.0f;
 | 
			
		||||
            fd.friction = 0.6f;
 | 
			
		||||
 | 
			
		||||
            b2RevoluteJointDef jd;
 | 
			
		||||
 | 
			
		||||
            b2Body* prevBody = ground;
 | 
			
		||||
            for (int32 i = 0; i < N; ++i)
 | 
			
		||||
            {
 | 
			
		||||
                b2BodyDef bd;
 | 
			
		||||
                bd.type = b2_dynamicBody;
 | 
			
		||||
                bd.position.Set(161.0f + 2.0f * i, -0.125f);
 | 
			
		||||
                b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
                body->CreateFixture(&fd);
 | 
			
		||||
 | 
			
		||||
                b2Vec2 anchor(160.0f + 2.0f * i, -0.125f);
 | 
			
		||||
                jd.Initialize(prevBody, body, anchor);
 | 
			
		||||
                m_world->CreateJoint(&jd);
 | 
			
		||||
 | 
			
		||||
                prevBody = body;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            b2Vec2 anchor(160.0f + 2.0f * N, -0.125f);
 | 
			
		||||
            jd.Initialize(prevBody, ground, anchor);
 | 
			
		||||
            m_world->CreateJoint(&jd);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Boxes
 | 
			
		||||
        {
 | 
			
		||||
            b2PolygonShape box;
 | 
			
		||||
            box.SetAsBox(0.5f, 0.5f);
 | 
			
		||||
 | 
			
		||||
            b2Body* body = NULL;
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
 | 
			
		||||
            bd.position.Set(230.0f, 0.5f);
 | 
			
		||||
            body = m_world->CreateBody(&bd);
 | 
			
		||||
            body->CreateFixture(&box, 0.5f);
 | 
			
		||||
 | 
			
		||||
            bd.position.Set(230.0f, 1.5f);
 | 
			
		||||
            body = m_world->CreateBody(&bd);
 | 
			
		||||
            body->CreateFixture(&box, 0.5f);
 | 
			
		||||
 | 
			
		||||
            bd.position.Set(230.0f, 2.5f);
 | 
			
		||||
            body = m_world->CreateBody(&bd);
 | 
			
		||||
            body->CreateFixture(&box, 0.5f);
 | 
			
		||||
 | 
			
		||||
            bd.position.Set(230.0f, 3.5f);
 | 
			
		||||
            body = m_world->CreateBody(&bd);
 | 
			
		||||
            body->CreateFixture(&box, 0.5f);
 | 
			
		||||
 | 
			
		||||
            bd.position.Set(230.0f, 4.5f);
 | 
			
		||||
            body = m_world->CreateBody(&bd);
 | 
			
		||||
            body->CreateFixture(&box, 0.5f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Car
 | 
			
		||||
        {
 | 
			
		||||
            b2PolygonShape chassis;
 | 
			
		||||
            b2Vec2 vertices[8];
 | 
			
		||||
            vertices[0].Set(-1.5f, -0.5f);
 | 
			
		||||
            vertices[1].Set(1.5f, -0.5f);
 | 
			
		||||
            vertices[2].Set(1.5f, 0.0f);
 | 
			
		||||
            vertices[3].Set(0.0f, 0.9f);
 | 
			
		||||
            vertices[4].Set(-1.15f, 0.9f);
 | 
			
		||||
            vertices[5].Set(-1.5f, 0.2f);
 | 
			
		||||
            chassis.Set(vertices, 6);
 | 
			
		||||
 | 
			
		||||
            b2CircleShape circle;
 | 
			
		||||
            circle.m_radius = 0.4f;
 | 
			
		||||
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
            bd.position.Set(0.0f, 1.0f);
 | 
			
		||||
            m_car = m_world->CreateBody(&bd);
 | 
			
		||||
            m_car->CreateFixture(&chassis, 1.0f);
 | 
			
		||||
 | 
			
		||||
            b2FixtureDef fd;
 | 
			
		||||
            fd.shape = &circle;
 | 
			
		||||
            fd.density = 1.0f;
 | 
			
		||||
            fd.friction = 0.9f;
 | 
			
		||||
 | 
			
		||||
            bd.position.Set(-1.0f, 0.35f);
 | 
			
		||||
            m_wheel1 = m_world->CreateBody(&bd);
 | 
			
		||||
            m_wheel1->CreateFixture(&fd);
 | 
			
		||||
 | 
			
		||||
            bd.position.Set(1.0f, 0.4f);
 | 
			
		||||
            m_wheel2 = m_world->CreateBody(&bd);
 | 
			
		||||
            m_wheel2->CreateFixture(&fd);
 | 
			
		||||
 | 
			
		||||
            b2WheelJointDef jd;
 | 
			
		||||
            b2Vec2 axis(0.0f, 1.0f);
 | 
			
		||||
 | 
			
		||||
            jd.Initialize(m_car, m_wheel1, m_wheel1->GetPosition(), axis);
 | 
			
		||||
            jd.motorSpeed = 0.0f;
 | 
			
		||||
            jd.maxMotorTorque = 20.0f;
 | 
			
		||||
            jd.enableMotor = true;
 | 
			
		||||
            jd.frequencyHz = m_hz;
 | 
			
		||||
            jd.dampingRatio = m_zeta;
 | 
			
		||||
            m_spring1 = (b2WheelJoint*)m_world->CreateJoint(&jd);
 | 
			
		||||
 | 
			
		||||
            jd.Initialize(m_car, m_wheel2, m_wheel2->GetPosition(), axis);
 | 
			
		||||
            jd.motorSpeed = 0.0f;
 | 
			
		||||
            jd.maxMotorTorque = 10.0f;
 | 
			
		||||
            jd.enableMotor = false;
 | 
			
		||||
            jd.frequencyHz = m_hz;
 | 
			
		||||
            jd.dampingRatio = m_zeta;
 | 
			
		||||
            m_spring2 = (b2WheelJoint*)m_world->CreateJoint(&jd);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Keyboard(unsigned char key)
 | 
			
		||||
    {
 | 
			
		||||
        switch (key)
 | 
			
		||||
        {
 | 
			
		||||
        case 'a':
 | 
			
		||||
            m_spring1->SetMotorSpeed(m_speed);
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case 's':
 | 
			
		||||
            m_spring1->SetMotorSpeed(0.0f);
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case 'd':
 | 
			
		||||
            m_spring1->SetMotorSpeed(-m_speed);
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case 'q':
 | 
			
		||||
            m_hz = b2Max(0.0f, m_hz - 1.0f);
 | 
			
		||||
            m_spring1->SetSpringFrequencyHz(m_hz);
 | 
			
		||||
            m_spring2->SetSpringFrequencyHz(m_hz);
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case 'e':
 | 
			
		||||
            m_hz += 1.0f;
 | 
			
		||||
            m_spring1->SetSpringFrequencyHz(m_hz);
 | 
			
		||||
            m_spring2->SetSpringFrequencyHz(m_hz);
 | 
			
		||||
            break;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Step(Settings* settings)
 | 
			
		||||
    {
 | 
			
		||||
        m_debugDraw.DrawString(5, m_textLine, "Keys: left = a, brake = s, right = d, hz down = q, hz up = e");
 | 
			
		||||
        m_textLine += 15;
 | 
			
		||||
        m_debugDraw.DrawString(5, m_textLine, "frequency = %g hz, damping ratio = %g", m_hz, m_zeta);
 | 
			
		||||
        m_textLine += 15;
 | 
			
		||||
 | 
			
		||||
        settings->viewCenter.x = m_car->GetPosition().x;
 | 
			
		||||
        Test::Step(settings);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new Car;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    b2Body* m_car;
 | 
			
		||||
    b2Body* m_wheel1;
 | 
			
		||||
    b2Body* m_wheel2;
 | 
			
		||||
 | 
			
		||||
    float32 m_hz;
 | 
			
		||||
    float32 m_zeta;
 | 
			
		||||
    float32 m_speed;
 | 
			
		||||
    b2WheelJoint* m_spring1;
 | 
			
		||||
    b2WheelJoint* m_spring2;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -1,74 +1,74 @@
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef CHAIN_H
 | 
			
		||||
#define CHAIN_H
 | 
			
		||||
 | 
			
		||||
class Chain : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
    Chain()
 | 
			
		||||
    {
 | 
			
		||||
        b2Body* ground = {};
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            ground = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2EdgeShape shape;
 | 
			
		||||
            shape.Set(b2Vec2(-40.0f, 0.0f), b2Vec2(40.0f, 0.0f));
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(0.6f, 0.125f);
 | 
			
		||||
 | 
			
		||||
            b2FixtureDef fd;
 | 
			
		||||
            fd.shape = &shape;
 | 
			
		||||
            fd.density = 20.0f;
 | 
			
		||||
            fd.friction = 0.2f;
 | 
			
		||||
 | 
			
		||||
            b2RevoluteJointDef jd;
 | 
			
		||||
            jd.collideConnected = false;
 | 
			
		||||
 | 
			
		||||
            const float32 y = 25.0f;
 | 
			
		||||
            b2Body* prevBody = ground;
 | 
			
		||||
            for (int i = 0; i < 30; ++i)
 | 
			
		||||
            {
 | 
			
		||||
                b2BodyDef bd;
 | 
			
		||||
                bd.type = b2_dynamicBody;
 | 
			
		||||
                bd.position.Set(0.5f + i, y);
 | 
			
		||||
                b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
                body->CreateFixture(&fd);
 | 
			
		||||
 | 
			
		||||
                b2Vec2 anchor(float32(i), y);
 | 
			
		||||
                jd.Initialize(prevBody, body, anchor);
 | 
			
		||||
                m_world->CreateJoint(&jd);
 | 
			
		||||
 | 
			
		||||
                prevBody = body;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new Chain;
 | 
			
		||||
    }
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef CHAIN_H
 | 
			
		||||
#define CHAIN_H
 | 
			
		||||
 | 
			
		||||
class Chain : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
    Chain()
 | 
			
		||||
    {
 | 
			
		||||
        b2Body* ground = {};
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            ground = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2EdgeShape shape;
 | 
			
		||||
            shape.Set(b2Vec2(-40.0f, 0.0f), b2Vec2(40.0f, 0.0f));
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(0.6f, 0.125f);
 | 
			
		||||
 | 
			
		||||
            b2FixtureDef fd;
 | 
			
		||||
            fd.shape = &shape;
 | 
			
		||||
            fd.density = 20.0f;
 | 
			
		||||
            fd.friction = 0.2f;
 | 
			
		||||
 | 
			
		||||
            b2RevoluteJointDef jd;
 | 
			
		||||
            jd.collideConnected = false;
 | 
			
		||||
 | 
			
		||||
            const float32 y = 25.0f;
 | 
			
		||||
            b2Body* prevBody = ground;
 | 
			
		||||
            for (int i = 0; i < 30; ++i)
 | 
			
		||||
            {
 | 
			
		||||
                b2BodyDef bd;
 | 
			
		||||
                bd.type = b2_dynamicBody;
 | 
			
		||||
                bd.position.Set(0.5f + i, y);
 | 
			
		||||
                b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
                body->CreateFixture(&fd);
 | 
			
		||||
 | 
			
		||||
                b2Vec2 anchor(float32(i), y);
 | 
			
		||||
                jd.Initialize(prevBody, body, anchor);
 | 
			
		||||
                m_world->CreateJoint(&jd);
 | 
			
		||||
 | 
			
		||||
                prevBody = body;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new Chain;
 | 
			
		||||
    }
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -1,253 +1,253 @@
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2006-2010 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef CHARACTER_COLLISION_H
 | 
			
		||||
#define CHARACTER_COLLISION_H
 | 
			
		||||
 | 
			
		||||
/// This is a test of typical character collision scenarios. This does not
 | 
			
		||||
/// show how you should implement a character in your application.
 | 
			
		||||
/// Instead this is used to test smooth collision on edge chains.
 | 
			
		||||
class CharacterCollision : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
    CharacterCollision()
 | 
			
		||||
    {
 | 
			
		||||
        // Ground body
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            b2Body* ground = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2EdgeShape shape;
 | 
			
		||||
            shape.Set(b2Vec2(-20.0f, 0.0f), b2Vec2(20.0f, 0.0f));
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Collinear edges with no adjacency information.
 | 
			
		||||
        // This shows the problematic case where a box shape can hit
 | 
			
		||||
        // an internal vertex.
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            b2Body* ground = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2EdgeShape shape;
 | 
			
		||||
            shape.Set(b2Vec2(-8.0f, 1.0f), b2Vec2(-6.0f, 1.0f));
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
            shape.Set(b2Vec2(-6.0f, 1.0f), b2Vec2(-4.0f, 1.0f));
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
            shape.Set(b2Vec2(-4.0f, 1.0f), b2Vec2(-2.0f, 1.0f));
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Chain shape
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.angle = 0.25f * b2_pi;
 | 
			
		||||
            b2Body* ground = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2Vec2 vs[4];
 | 
			
		||||
            vs[0].Set(5.0f, 7.0f);
 | 
			
		||||
            vs[1].Set(6.0f, 8.0f);
 | 
			
		||||
            vs[2].Set(7.0f, 8.0f);
 | 
			
		||||
            vs[3].Set(8.0f, 7.0f);
 | 
			
		||||
            b2ChainShape shape;
 | 
			
		||||
            shape.CreateChain(vs, 4);
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Square tiles. This shows that adjacency shapes may
 | 
			
		||||
        // have non-smooth collision. There is no solution
 | 
			
		||||
        // to this problem.
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            b2Body* ground = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(1.0f, 1.0f, b2Vec2(4.0f, 3.0f), 0.0f);
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
            shape.SetAsBox(1.0f, 1.0f, b2Vec2(6.0f, 3.0f), 0.0f);
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
            shape.SetAsBox(1.0f, 1.0f, b2Vec2(8.0f, 3.0f), 0.0f);
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Square made from an edge loop. Collision should be smooth.
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            b2Body* ground = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2Vec2 vs[4];
 | 
			
		||||
            vs[0].Set(-1.0f, 3.0f);
 | 
			
		||||
            vs[1].Set(1.0f, 3.0f);
 | 
			
		||||
            vs[2].Set(1.0f, 5.0f);
 | 
			
		||||
            vs[3].Set(-1.0f, 5.0f);
 | 
			
		||||
            b2ChainShape shape;
 | 
			
		||||
            shape.CreateLoop(vs, 4);
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Edge loop. Collision should be smooth.
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.position.Set(-10.0f, 4.0f);
 | 
			
		||||
            b2Body* ground = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2Vec2 vs[10];
 | 
			
		||||
            vs[0].Set(0.0f, 0.0f);
 | 
			
		||||
            vs[1].Set(6.0f, 0.0f);
 | 
			
		||||
            vs[2].Set(6.0f, 2.0f);
 | 
			
		||||
            vs[3].Set(4.0f, 1.0f);
 | 
			
		||||
            vs[4].Set(2.0f, 2.0f);
 | 
			
		||||
            vs[5].Set(0.0f, 2.0f);
 | 
			
		||||
            vs[6].Set(-2.0f, 2.0f);
 | 
			
		||||
            vs[7].Set(-4.0f, 3.0f);
 | 
			
		||||
            vs[8].Set(-6.0f, 2.0f);
 | 
			
		||||
            vs[9].Set(-6.0f, 0.0f);
 | 
			
		||||
            b2ChainShape shape;
 | 
			
		||||
            shape.CreateLoop(vs, 10);
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Square character 1
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.position.Set(-3.0f, 8.0f);
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
            bd.fixedRotation = true;
 | 
			
		||||
            bd.allowSleep = false;
 | 
			
		||||
 | 
			
		||||
            b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(0.5f, 0.5f);
 | 
			
		||||
 | 
			
		||||
            b2FixtureDef fd;
 | 
			
		||||
            fd.shape = &shape;
 | 
			
		||||
            fd.density = 20.0f;
 | 
			
		||||
            body->CreateFixture(&fd);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Square character 2
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.position.Set(-5.0f, 5.0f);
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
            bd.fixedRotation = true;
 | 
			
		||||
            bd.allowSleep = false;
 | 
			
		||||
 | 
			
		||||
            b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(0.25f, 0.25f);
 | 
			
		||||
 | 
			
		||||
            b2FixtureDef fd;
 | 
			
		||||
            fd.shape = &shape;
 | 
			
		||||
            fd.density = 20.0f;
 | 
			
		||||
            body->CreateFixture(&fd);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Hexagon character
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.position.Set(-5.0f, 8.0f);
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
            bd.fixedRotation = true;
 | 
			
		||||
            bd.allowSleep = false;
 | 
			
		||||
 | 
			
		||||
            b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            float32 angle = 0.0f;
 | 
			
		||||
            float32 delta = b2_pi / 3.0f;
 | 
			
		||||
            b2Vec2 vertices[6];
 | 
			
		||||
            for (int32 i = 0; i < 6; ++i)
 | 
			
		||||
            {
 | 
			
		||||
                vertices[i].Set(0.5f * cosf(angle), 0.5f * sinf(angle));
 | 
			
		||||
                angle += delta;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.Set(vertices, 6);
 | 
			
		||||
 | 
			
		||||
            b2FixtureDef fd;
 | 
			
		||||
            fd.shape = &shape;
 | 
			
		||||
            fd.density = 20.0f;
 | 
			
		||||
            body->CreateFixture(&fd);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Circle character
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.position.Set(3.0f, 5.0f);
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
            bd.fixedRotation = true;
 | 
			
		||||
            bd.allowSleep = false;
 | 
			
		||||
 | 
			
		||||
            b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2CircleShape shape;
 | 
			
		||||
            shape.m_radius = 0.5f;
 | 
			
		||||
 | 
			
		||||
            b2FixtureDef fd;
 | 
			
		||||
            fd.shape = &shape;
 | 
			
		||||
            fd.density = 20.0f;
 | 
			
		||||
            body->CreateFixture(&fd);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Circle character
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.position.Set(-7.0f, 6.0f);
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
            bd.allowSleep = false;
 | 
			
		||||
 | 
			
		||||
            m_character = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2CircleShape shape;
 | 
			
		||||
            shape.m_radius = 0.25f;
 | 
			
		||||
 | 
			
		||||
            b2FixtureDef fd;
 | 
			
		||||
            fd.shape = &shape;
 | 
			
		||||
            fd.density = 20.0f;
 | 
			
		||||
            fd.friction = 1.0f;
 | 
			
		||||
            m_character->CreateFixture(&fd);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Step(Settings* settings)
 | 
			
		||||
    {
 | 
			
		||||
        b2Vec2 v = m_character->GetLinearVelocity();
 | 
			
		||||
        v.x = -5.0f;
 | 
			
		||||
        m_character->SetLinearVelocity(v);
 | 
			
		||||
 | 
			
		||||
        Test::Step(settings);
 | 
			
		||||
        m_debugDraw.DrawString(5, m_textLine, "This tests various character collision shapes.");
 | 
			
		||||
        m_textLine += 15;
 | 
			
		||||
        m_debugDraw.DrawString(5, m_textLine, "Limitation: square and hexagon can snag on aligned boxes.");
 | 
			
		||||
        m_textLine += 15;
 | 
			
		||||
        m_debugDraw.DrawString(5, m_textLine, "Feature: edge chains have smooth collision inside and out.");
 | 
			
		||||
        m_textLine += 15;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new CharacterCollision;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    b2Body* m_character;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2006-2010 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef CHARACTER_COLLISION_H
 | 
			
		||||
#define CHARACTER_COLLISION_H
 | 
			
		||||
 | 
			
		||||
/// This is a test of typical character collision scenarios. This does not
 | 
			
		||||
/// show how you should implement a character in your application.
 | 
			
		||||
/// Instead this is used to test smooth collision on edge chains.
 | 
			
		||||
class CharacterCollision : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
    CharacterCollision()
 | 
			
		||||
    {
 | 
			
		||||
        // Ground body
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            b2Body* ground = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2EdgeShape shape;
 | 
			
		||||
            shape.Set(b2Vec2(-20.0f, 0.0f), b2Vec2(20.0f, 0.0f));
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Collinear edges with no adjacency information.
 | 
			
		||||
        // This shows the problematic case where a box shape can hit
 | 
			
		||||
        // an internal vertex.
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            b2Body* ground = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2EdgeShape shape;
 | 
			
		||||
            shape.Set(b2Vec2(-8.0f, 1.0f), b2Vec2(-6.0f, 1.0f));
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
            shape.Set(b2Vec2(-6.0f, 1.0f), b2Vec2(-4.0f, 1.0f));
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
            shape.Set(b2Vec2(-4.0f, 1.0f), b2Vec2(-2.0f, 1.0f));
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Chain shape
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.angle = 0.25f * b2_pi;
 | 
			
		||||
            b2Body* ground = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2Vec2 vs[4];
 | 
			
		||||
            vs[0].Set(5.0f, 7.0f);
 | 
			
		||||
            vs[1].Set(6.0f, 8.0f);
 | 
			
		||||
            vs[2].Set(7.0f, 8.0f);
 | 
			
		||||
            vs[3].Set(8.0f, 7.0f);
 | 
			
		||||
            b2ChainShape shape;
 | 
			
		||||
            shape.CreateChain(vs, 4);
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Square tiles. This shows that adjacency shapes may
 | 
			
		||||
        // have non-smooth collision. There is no solution
 | 
			
		||||
        // to this problem.
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            b2Body* ground = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(1.0f, 1.0f, b2Vec2(4.0f, 3.0f), 0.0f);
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
            shape.SetAsBox(1.0f, 1.0f, b2Vec2(6.0f, 3.0f), 0.0f);
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
            shape.SetAsBox(1.0f, 1.0f, b2Vec2(8.0f, 3.0f), 0.0f);
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Square made from an edge loop. Collision should be smooth.
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            b2Body* ground = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2Vec2 vs[4];
 | 
			
		||||
            vs[0].Set(-1.0f, 3.0f);
 | 
			
		||||
            vs[1].Set(1.0f, 3.0f);
 | 
			
		||||
            vs[2].Set(1.0f, 5.0f);
 | 
			
		||||
            vs[3].Set(-1.0f, 5.0f);
 | 
			
		||||
            b2ChainShape shape;
 | 
			
		||||
            shape.CreateLoop(vs, 4);
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Edge loop. Collision should be smooth.
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.position.Set(-10.0f, 4.0f);
 | 
			
		||||
            b2Body* ground = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2Vec2 vs[10];
 | 
			
		||||
            vs[0].Set(0.0f, 0.0f);
 | 
			
		||||
            vs[1].Set(6.0f, 0.0f);
 | 
			
		||||
            vs[2].Set(6.0f, 2.0f);
 | 
			
		||||
            vs[3].Set(4.0f, 1.0f);
 | 
			
		||||
            vs[4].Set(2.0f, 2.0f);
 | 
			
		||||
            vs[5].Set(0.0f, 2.0f);
 | 
			
		||||
            vs[6].Set(-2.0f, 2.0f);
 | 
			
		||||
            vs[7].Set(-4.0f, 3.0f);
 | 
			
		||||
            vs[8].Set(-6.0f, 2.0f);
 | 
			
		||||
            vs[9].Set(-6.0f, 0.0f);
 | 
			
		||||
            b2ChainShape shape;
 | 
			
		||||
            shape.CreateLoop(vs, 10);
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Square character 1
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.position.Set(-3.0f, 8.0f);
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
            bd.fixedRotation = true;
 | 
			
		||||
            bd.allowSleep = false;
 | 
			
		||||
 | 
			
		||||
            b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(0.5f, 0.5f);
 | 
			
		||||
 | 
			
		||||
            b2FixtureDef fd;
 | 
			
		||||
            fd.shape = &shape;
 | 
			
		||||
            fd.density = 20.0f;
 | 
			
		||||
            body->CreateFixture(&fd);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Square character 2
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.position.Set(-5.0f, 5.0f);
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
            bd.fixedRotation = true;
 | 
			
		||||
            bd.allowSleep = false;
 | 
			
		||||
 | 
			
		||||
            b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(0.25f, 0.25f);
 | 
			
		||||
 | 
			
		||||
            b2FixtureDef fd;
 | 
			
		||||
            fd.shape = &shape;
 | 
			
		||||
            fd.density = 20.0f;
 | 
			
		||||
            body->CreateFixture(&fd);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Hexagon character
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.position.Set(-5.0f, 8.0f);
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
            bd.fixedRotation = true;
 | 
			
		||||
            bd.allowSleep = false;
 | 
			
		||||
 | 
			
		||||
            b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            float32 angle = 0.0f;
 | 
			
		||||
            float32 delta = b2_pi / 3.0f;
 | 
			
		||||
            b2Vec2 vertices[6];
 | 
			
		||||
            for (int32 i = 0; i < 6; ++i)
 | 
			
		||||
            {
 | 
			
		||||
                vertices[i].Set(0.5f * cosf(angle), 0.5f * sinf(angle));
 | 
			
		||||
                angle += delta;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.Set(vertices, 6);
 | 
			
		||||
 | 
			
		||||
            b2FixtureDef fd;
 | 
			
		||||
            fd.shape = &shape;
 | 
			
		||||
            fd.density = 20.0f;
 | 
			
		||||
            body->CreateFixture(&fd);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Circle character
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.position.Set(3.0f, 5.0f);
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
            bd.fixedRotation = true;
 | 
			
		||||
            bd.allowSleep = false;
 | 
			
		||||
 | 
			
		||||
            b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2CircleShape shape;
 | 
			
		||||
            shape.m_radius = 0.5f;
 | 
			
		||||
 | 
			
		||||
            b2FixtureDef fd;
 | 
			
		||||
            fd.shape = &shape;
 | 
			
		||||
            fd.density = 20.0f;
 | 
			
		||||
            body->CreateFixture(&fd);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Circle character
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.position.Set(-7.0f, 6.0f);
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
            bd.allowSleep = false;
 | 
			
		||||
 | 
			
		||||
            m_character = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2CircleShape shape;
 | 
			
		||||
            shape.m_radius = 0.25f;
 | 
			
		||||
 | 
			
		||||
            b2FixtureDef fd;
 | 
			
		||||
            fd.shape = &shape;
 | 
			
		||||
            fd.density = 20.0f;
 | 
			
		||||
            fd.friction = 1.0f;
 | 
			
		||||
            m_character->CreateFixture(&fd);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Step(Settings* settings)
 | 
			
		||||
    {
 | 
			
		||||
        b2Vec2 v = m_character->GetLinearVelocity();
 | 
			
		||||
        v.x = -5.0f;
 | 
			
		||||
        m_character->SetLinearVelocity(v);
 | 
			
		||||
 | 
			
		||||
        Test::Step(settings);
 | 
			
		||||
        m_debugDraw.DrawString(5, m_textLine, "This tests various character collision shapes.");
 | 
			
		||||
        m_textLine += 15;
 | 
			
		||||
        m_debugDraw.DrawString(5, m_textLine, "Limitation: square and hexagon can snag on aligned boxes.");
 | 
			
		||||
        m_textLine += 15;
 | 
			
		||||
        m_debugDraw.DrawString(5, m_textLine, "Feature: edge chains have smooth collision inside and out.");
 | 
			
		||||
        m_textLine += 15;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new CharacterCollision;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    b2Body* m_character;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -1,176 +1,176 @@
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef COLLISION_FILTERING_H
 | 
			
		||||
#define COLLISION_FILTERING_H
 | 
			
		||||
 | 
			
		||||
// This is a test of collision filtering.
 | 
			
		||||
// There is a triangle, a box, and a circle.
 | 
			
		||||
// There are 6 shapes. 3 large and 3 small.
 | 
			
		||||
// The 3 small ones always collide.
 | 
			
		||||
// The 3 large ones never collide.
 | 
			
		||||
// The boxes don't collide with triangles (except if both are small).
 | 
			
		||||
const int16 k_smallGroup = 1;
 | 
			
		||||
const int16 k_largeGroup = -1;
 | 
			
		||||
 | 
			
		||||
const uint16 k_defaultCategory = 0x0001;
 | 
			
		||||
const uint16 k_triangleCategory = 0x0002;
 | 
			
		||||
const uint16 k_boxCategory = 0x0004;
 | 
			
		||||
const uint16 k_circleCategory = 0x0008;
 | 
			
		||||
 | 
			
		||||
const uint16 k_triangleMask = 0xFFFF;
 | 
			
		||||
const uint16 k_boxMask = 0xFFFF ^ k_triangleCategory;
 | 
			
		||||
const uint16 k_circleMask = 0xFFFF;
 | 
			
		||||
 | 
			
		||||
class CollisionFiltering : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
    CollisionFiltering()
 | 
			
		||||
    {
 | 
			
		||||
        // Ground body
 | 
			
		||||
        {
 | 
			
		||||
            b2EdgeShape shape;
 | 
			
		||||
            shape.Set(b2Vec2(-40.0f, 0.0f), b2Vec2(40.0f, 0.0f));
 | 
			
		||||
 | 
			
		||||
            b2FixtureDef sd;
 | 
			
		||||
            sd.shape = &shape;
 | 
			
		||||
            sd.friction = 0.3f;
 | 
			
		||||
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            b2Body* ground = m_world->CreateBody(&bd);
 | 
			
		||||
            ground->CreateFixture(&sd);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Small triangle
 | 
			
		||||
        b2Vec2 vertices[3];
 | 
			
		||||
        vertices[0].Set(-1.0f, 0.0f);
 | 
			
		||||
        vertices[1].Set(1.0f, 0.0f);
 | 
			
		||||
        vertices[2].Set(0.0f, 2.0f);
 | 
			
		||||
        b2PolygonShape polygon;
 | 
			
		||||
        polygon.Set(vertices, 3);
 | 
			
		||||
 | 
			
		||||
        b2FixtureDef triangleShapeDef;
 | 
			
		||||
        triangleShapeDef.shape = &polygon;
 | 
			
		||||
        triangleShapeDef.density = 1.0f;
 | 
			
		||||
 | 
			
		||||
        triangleShapeDef.filter.groupIndex = k_smallGroup;
 | 
			
		||||
        triangleShapeDef.filter.categoryBits = k_triangleCategory;
 | 
			
		||||
        triangleShapeDef.filter.maskBits = k_triangleMask;
 | 
			
		||||
 | 
			
		||||
        b2BodyDef triangleBodyDef;
 | 
			
		||||
        triangleBodyDef.type = b2_dynamicBody;
 | 
			
		||||
        triangleBodyDef.position.Set(-5.0f, 2.0f);
 | 
			
		||||
 | 
			
		||||
        b2Body* body1 = m_world->CreateBody(&triangleBodyDef);
 | 
			
		||||
        body1->CreateFixture(&triangleShapeDef);
 | 
			
		||||
 | 
			
		||||
        // Large triangle (recycle definitions)
 | 
			
		||||
        vertices[0] *= 2.0f;
 | 
			
		||||
        vertices[1] *= 2.0f;
 | 
			
		||||
        vertices[2] *= 2.0f;
 | 
			
		||||
        polygon.Set(vertices, 3);
 | 
			
		||||
        triangleShapeDef.filter.groupIndex = k_largeGroup;
 | 
			
		||||
        triangleBodyDef.position.Set(-5.0f, 6.0f);
 | 
			
		||||
        triangleBodyDef.fixedRotation = true; // look at me!
 | 
			
		||||
 | 
			
		||||
        b2Body* body2 = m_world->CreateBody(&triangleBodyDef);
 | 
			
		||||
        body2->CreateFixture(&triangleShapeDef);
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
            bd.position.Set(-5.0f, 10.0f);
 | 
			
		||||
            b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2PolygonShape p;
 | 
			
		||||
            p.SetAsBox(0.5f, 1.0f);
 | 
			
		||||
            body->CreateFixture(&p, 1.0f);
 | 
			
		||||
 | 
			
		||||
            b2PrismaticJointDef jd;
 | 
			
		||||
            jd.bodyA = body2;
 | 
			
		||||
            jd.bodyB = body;
 | 
			
		||||
            jd.enableLimit = true;
 | 
			
		||||
            jd.localAnchorA.Set(0.0f, 4.0f);
 | 
			
		||||
            jd.localAnchorB.SetZero();
 | 
			
		||||
            jd.localAxisA.Set(0.0f, 1.0f);
 | 
			
		||||
            jd.lowerTranslation = -1.0f;
 | 
			
		||||
            jd.upperTranslation = 1.0f;
 | 
			
		||||
 | 
			
		||||
            m_world->CreateJoint(&jd);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Small box
 | 
			
		||||
        polygon.SetAsBox(1.0f, 0.5f);
 | 
			
		||||
        b2FixtureDef boxShapeDef;
 | 
			
		||||
        boxShapeDef.shape = &polygon;
 | 
			
		||||
        boxShapeDef.density = 1.0f;
 | 
			
		||||
        boxShapeDef.restitution = 0.1f;
 | 
			
		||||
 | 
			
		||||
        boxShapeDef.filter.groupIndex = k_smallGroup;
 | 
			
		||||
        boxShapeDef.filter.categoryBits = k_boxCategory;
 | 
			
		||||
        boxShapeDef.filter.maskBits = k_boxMask;
 | 
			
		||||
 | 
			
		||||
        b2BodyDef boxBodyDef;
 | 
			
		||||
        boxBodyDef.type = b2_dynamicBody;
 | 
			
		||||
        boxBodyDef.position.Set(0.0f, 2.0f);
 | 
			
		||||
 | 
			
		||||
        b2Body* body3 = m_world->CreateBody(&boxBodyDef);
 | 
			
		||||
        body3->CreateFixture(&boxShapeDef);
 | 
			
		||||
 | 
			
		||||
        // Large box (recycle definitions)
 | 
			
		||||
        polygon.SetAsBox(2.0f, 1.0f);
 | 
			
		||||
        boxShapeDef.filter.groupIndex = k_largeGroup;
 | 
			
		||||
        boxBodyDef.position.Set(0.0f, 6.0f);
 | 
			
		||||
 | 
			
		||||
        b2Body* body4 = m_world->CreateBody(&boxBodyDef);
 | 
			
		||||
        body4->CreateFixture(&boxShapeDef);
 | 
			
		||||
 | 
			
		||||
        // Small circle
 | 
			
		||||
        b2CircleShape circle;
 | 
			
		||||
        circle.m_radius = 1.0f;
 | 
			
		||||
 | 
			
		||||
        b2FixtureDef circleShapeDef;
 | 
			
		||||
        circleShapeDef.shape = &circle;
 | 
			
		||||
        circleShapeDef.density = 1.0f;
 | 
			
		||||
 | 
			
		||||
        circleShapeDef.filter.groupIndex = k_smallGroup;
 | 
			
		||||
        circleShapeDef.filter.categoryBits = k_circleCategory;
 | 
			
		||||
        circleShapeDef.filter.maskBits = k_circleMask;
 | 
			
		||||
 | 
			
		||||
        b2BodyDef circleBodyDef;
 | 
			
		||||
        circleBodyDef.type = b2_dynamicBody;
 | 
			
		||||
        circleBodyDef.position.Set(5.0f, 2.0f);
 | 
			
		||||
 | 
			
		||||
        b2Body* body5 = m_world->CreateBody(&circleBodyDef);
 | 
			
		||||
        body5->CreateFixture(&circleShapeDef);
 | 
			
		||||
 | 
			
		||||
        // Large circle
 | 
			
		||||
        circle.m_radius *= 2.0f;
 | 
			
		||||
        circleShapeDef.filter.groupIndex = k_largeGroup;
 | 
			
		||||
        circleBodyDef.position.Set(5.0f, 6.0f);
 | 
			
		||||
 | 
			
		||||
        b2Body* body6 = m_world->CreateBody(&circleBodyDef);
 | 
			
		||||
        body6->CreateFixture(&circleShapeDef);
 | 
			
		||||
    }
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new CollisionFiltering;
 | 
			
		||||
    }
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef COLLISION_FILTERING_H
 | 
			
		||||
#define COLLISION_FILTERING_H
 | 
			
		||||
 | 
			
		||||
// This is a test of collision filtering.
 | 
			
		||||
// There is a triangle, a box, and a circle.
 | 
			
		||||
// There are 6 shapes. 3 large and 3 small.
 | 
			
		||||
// The 3 small ones always collide.
 | 
			
		||||
// The 3 large ones never collide.
 | 
			
		||||
// The boxes don't collide with triangles (except if both are small).
 | 
			
		||||
const int16 k_smallGroup = 1;
 | 
			
		||||
const int16 k_largeGroup = -1;
 | 
			
		||||
 | 
			
		||||
const uint16 k_defaultCategory = 0x0001;
 | 
			
		||||
const uint16 k_triangleCategory = 0x0002;
 | 
			
		||||
const uint16 k_boxCategory = 0x0004;
 | 
			
		||||
const uint16 k_circleCategory = 0x0008;
 | 
			
		||||
 | 
			
		||||
const uint16 k_triangleMask = 0xFFFF;
 | 
			
		||||
const uint16 k_boxMask = 0xFFFF ^ k_triangleCategory;
 | 
			
		||||
const uint16 k_circleMask = 0xFFFF;
 | 
			
		||||
 | 
			
		||||
class CollisionFiltering : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
    CollisionFiltering()
 | 
			
		||||
    {
 | 
			
		||||
        // Ground body
 | 
			
		||||
        {
 | 
			
		||||
            b2EdgeShape shape;
 | 
			
		||||
            shape.Set(b2Vec2(-40.0f, 0.0f), b2Vec2(40.0f, 0.0f));
 | 
			
		||||
 | 
			
		||||
            b2FixtureDef sd;
 | 
			
		||||
            sd.shape = &shape;
 | 
			
		||||
            sd.friction = 0.3f;
 | 
			
		||||
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            b2Body* ground = m_world->CreateBody(&bd);
 | 
			
		||||
            ground->CreateFixture(&sd);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Small triangle
 | 
			
		||||
        b2Vec2 vertices[3];
 | 
			
		||||
        vertices[0].Set(-1.0f, 0.0f);
 | 
			
		||||
        vertices[1].Set(1.0f, 0.0f);
 | 
			
		||||
        vertices[2].Set(0.0f, 2.0f);
 | 
			
		||||
        b2PolygonShape polygon;
 | 
			
		||||
        polygon.Set(vertices, 3);
 | 
			
		||||
 | 
			
		||||
        b2FixtureDef triangleShapeDef;
 | 
			
		||||
        triangleShapeDef.shape = &polygon;
 | 
			
		||||
        triangleShapeDef.density = 1.0f;
 | 
			
		||||
 | 
			
		||||
        triangleShapeDef.filter.groupIndex = k_smallGroup;
 | 
			
		||||
        triangleShapeDef.filter.categoryBits = k_triangleCategory;
 | 
			
		||||
        triangleShapeDef.filter.maskBits = k_triangleMask;
 | 
			
		||||
 | 
			
		||||
        b2BodyDef triangleBodyDef;
 | 
			
		||||
        triangleBodyDef.type = b2_dynamicBody;
 | 
			
		||||
        triangleBodyDef.position.Set(-5.0f, 2.0f);
 | 
			
		||||
 | 
			
		||||
        b2Body* body1 = m_world->CreateBody(&triangleBodyDef);
 | 
			
		||||
        body1->CreateFixture(&triangleShapeDef);
 | 
			
		||||
 | 
			
		||||
        // Large triangle (recycle definitions)
 | 
			
		||||
        vertices[0] *= 2.0f;
 | 
			
		||||
        vertices[1] *= 2.0f;
 | 
			
		||||
        vertices[2] *= 2.0f;
 | 
			
		||||
        polygon.Set(vertices, 3);
 | 
			
		||||
        triangleShapeDef.filter.groupIndex = k_largeGroup;
 | 
			
		||||
        triangleBodyDef.position.Set(-5.0f, 6.0f);
 | 
			
		||||
        triangleBodyDef.fixedRotation = true; // look at me!
 | 
			
		||||
 | 
			
		||||
        b2Body* body2 = m_world->CreateBody(&triangleBodyDef);
 | 
			
		||||
        body2->CreateFixture(&triangleShapeDef);
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
            bd.position.Set(-5.0f, 10.0f);
 | 
			
		||||
            b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2PolygonShape p;
 | 
			
		||||
            p.SetAsBox(0.5f, 1.0f);
 | 
			
		||||
            body->CreateFixture(&p, 1.0f);
 | 
			
		||||
 | 
			
		||||
            b2PrismaticJointDef jd;
 | 
			
		||||
            jd.bodyA = body2;
 | 
			
		||||
            jd.bodyB = body;
 | 
			
		||||
            jd.enableLimit = true;
 | 
			
		||||
            jd.localAnchorA.Set(0.0f, 4.0f);
 | 
			
		||||
            jd.localAnchorB.SetZero();
 | 
			
		||||
            jd.localAxisA.Set(0.0f, 1.0f);
 | 
			
		||||
            jd.lowerTranslation = -1.0f;
 | 
			
		||||
            jd.upperTranslation = 1.0f;
 | 
			
		||||
 | 
			
		||||
            m_world->CreateJoint(&jd);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Small box
 | 
			
		||||
        polygon.SetAsBox(1.0f, 0.5f);
 | 
			
		||||
        b2FixtureDef boxShapeDef;
 | 
			
		||||
        boxShapeDef.shape = &polygon;
 | 
			
		||||
        boxShapeDef.density = 1.0f;
 | 
			
		||||
        boxShapeDef.restitution = 0.1f;
 | 
			
		||||
 | 
			
		||||
        boxShapeDef.filter.groupIndex = k_smallGroup;
 | 
			
		||||
        boxShapeDef.filter.categoryBits = k_boxCategory;
 | 
			
		||||
        boxShapeDef.filter.maskBits = k_boxMask;
 | 
			
		||||
 | 
			
		||||
        b2BodyDef boxBodyDef;
 | 
			
		||||
        boxBodyDef.type = b2_dynamicBody;
 | 
			
		||||
        boxBodyDef.position.Set(0.0f, 2.0f);
 | 
			
		||||
 | 
			
		||||
        b2Body* body3 = m_world->CreateBody(&boxBodyDef);
 | 
			
		||||
        body3->CreateFixture(&boxShapeDef);
 | 
			
		||||
 | 
			
		||||
        // Large box (recycle definitions)
 | 
			
		||||
        polygon.SetAsBox(2.0f, 1.0f);
 | 
			
		||||
        boxShapeDef.filter.groupIndex = k_largeGroup;
 | 
			
		||||
        boxBodyDef.position.Set(0.0f, 6.0f);
 | 
			
		||||
 | 
			
		||||
        b2Body* body4 = m_world->CreateBody(&boxBodyDef);
 | 
			
		||||
        body4->CreateFixture(&boxShapeDef);
 | 
			
		||||
 | 
			
		||||
        // Small circle
 | 
			
		||||
        b2CircleShape circle;
 | 
			
		||||
        circle.m_radius = 1.0f;
 | 
			
		||||
 | 
			
		||||
        b2FixtureDef circleShapeDef;
 | 
			
		||||
        circleShapeDef.shape = &circle;
 | 
			
		||||
        circleShapeDef.density = 1.0f;
 | 
			
		||||
 | 
			
		||||
        circleShapeDef.filter.groupIndex = k_smallGroup;
 | 
			
		||||
        circleShapeDef.filter.categoryBits = k_circleCategory;
 | 
			
		||||
        circleShapeDef.filter.maskBits = k_circleMask;
 | 
			
		||||
 | 
			
		||||
        b2BodyDef circleBodyDef;
 | 
			
		||||
        circleBodyDef.type = b2_dynamicBody;
 | 
			
		||||
        circleBodyDef.position.Set(5.0f, 2.0f);
 | 
			
		||||
 | 
			
		||||
        b2Body* body5 = m_world->CreateBody(&circleBodyDef);
 | 
			
		||||
        body5->CreateFixture(&circleShapeDef);
 | 
			
		||||
 | 
			
		||||
        // Large circle
 | 
			
		||||
        circle.m_radius *= 2.0f;
 | 
			
		||||
        circleShapeDef.filter.groupIndex = k_largeGroup;
 | 
			
		||||
        circleBodyDef.position.Set(5.0f, 6.0f);
 | 
			
		||||
 | 
			
		||||
        b2Body* body6 = m_world->CreateBody(&circleBodyDef);
 | 
			
		||||
        body6->CreateFixture(&circleShapeDef);
 | 
			
		||||
    }
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new CollisionFiltering;
 | 
			
		||||
    }
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -1,188 +1,188 @@
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef COLLISION_PROCESSING_H
 | 
			
		||||
#define COLLISION_PROCESSING_H
 | 
			
		||||
 | 
			
		||||
#include <algorithm>
 | 
			
		||||
 | 
			
		||||
// This test shows collision processing and tests
 | 
			
		||||
// deferred body destruction.
 | 
			
		||||
class CollisionProcessing : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
    CollisionProcessing()
 | 
			
		||||
    {
 | 
			
		||||
        // Ground body
 | 
			
		||||
        {
 | 
			
		||||
            b2EdgeShape shape;
 | 
			
		||||
            shape.Set(b2Vec2(-50.0f, 0.0f), b2Vec2(50.0f, 0.0f));
 | 
			
		||||
 | 
			
		||||
            b2FixtureDef sd;
 | 
			
		||||
            sd.shape = &shape;;
 | 
			
		||||
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            b2Body* ground = m_world->CreateBody(&bd);
 | 
			
		||||
            ground->CreateFixture(&sd);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        float32 xLo = -5.0f, xHi = 5.0f;
 | 
			
		||||
        float32 yLo = 2.0f, yHi = 35.0f;
 | 
			
		||||
 | 
			
		||||
        // Small triangle
 | 
			
		||||
        b2Vec2 vertices[3];
 | 
			
		||||
        vertices[0].Set(-1.0f, 0.0f);
 | 
			
		||||
        vertices[1].Set(1.0f, 0.0f);
 | 
			
		||||
        vertices[2].Set(0.0f, 2.0f);
 | 
			
		||||
 | 
			
		||||
        b2PolygonShape polygon;
 | 
			
		||||
        polygon.Set(vertices, 3);
 | 
			
		||||
 | 
			
		||||
        b2FixtureDef triangleShapeDef;
 | 
			
		||||
        triangleShapeDef.shape = &polygon;
 | 
			
		||||
        triangleShapeDef.density = 1.0f;
 | 
			
		||||
 | 
			
		||||
        b2BodyDef triangleBodyDef;
 | 
			
		||||
        triangleBodyDef.type = b2_dynamicBody;
 | 
			
		||||
        triangleBodyDef.position.Set(RandomFloat(xLo, xHi), RandomFloat(yLo, yHi));
 | 
			
		||||
 | 
			
		||||
        b2Body* body1 = m_world->CreateBody(&triangleBodyDef);
 | 
			
		||||
        body1->CreateFixture(&triangleShapeDef);
 | 
			
		||||
 | 
			
		||||
        // Large triangle (recycle definitions)
 | 
			
		||||
        vertices[0] *= 2.0f;
 | 
			
		||||
        vertices[1] *= 2.0f;
 | 
			
		||||
        vertices[2] *= 2.0f;
 | 
			
		||||
        polygon.Set(vertices, 3);
 | 
			
		||||
 | 
			
		||||
        triangleBodyDef.position.Set(RandomFloat(xLo, xHi), RandomFloat(yLo, yHi));
 | 
			
		||||
 | 
			
		||||
        b2Body* body2 = m_world->CreateBody(&triangleBodyDef);
 | 
			
		||||
        body2->CreateFixture(&triangleShapeDef);
 | 
			
		||||
 | 
			
		||||
        // Small box
 | 
			
		||||
        polygon.SetAsBox(1.0f, 0.5f);
 | 
			
		||||
 | 
			
		||||
        b2FixtureDef boxShapeDef;
 | 
			
		||||
        boxShapeDef.shape = &polygon;
 | 
			
		||||
        boxShapeDef.density = 1.0f;
 | 
			
		||||
 | 
			
		||||
        b2BodyDef boxBodyDef;
 | 
			
		||||
        boxBodyDef.type = b2_dynamicBody;
 | 
			
		||||
        boxBodyDef.position.Set(RandomFloat(xLo, xHi), RandomFloat(yLo, yHi));
 | 
			
		||||
 | 
			
		||||
        b2Body* body3 = m_world->CreateBody(&boxBodyDef);
 | 
			
		||||
        body3->CreateFixture(&boxShapeDef);
 | 
			
		||||
 | 
			
		||||
        // Large box (recycle definitions)
 | 
			
		||||
        polygon.SetAsBox(2.0f, 1.0f);
 | 
			
		||||
        boxBodyDef.position.Set(RandomFloat(xLo, xHi), RandomFloat(yLo, yHi));
 | 
			
		||||
 | 
			
		||||
        b2Body* body4 = m_world->CreateBody(&boxBodyDef);
 | 
			
		||||
        body4->CreateFixture(&boxShapeDef);
 | 
			
		||||
 | 
			
		||||
        // Small circle
 | 
			
		||||
        b2CircleShape circle;
 | 
			
		||||
        circle.m_radius = 1.0f;
 | 
			
		||||
 | 
			
		||||
        b2FixtureDef circleShapeDef;
 | 
			
		||||
        circleShapeDef.shape = &circle;
 | 
			
		||||
        circleShapeDef.density = 1.0f;
 | 
			
		||||
 | 
			
		||||
        b2BodyDef circleBodyDef;
 | 
			
		||||
        circleBodyDef.type = b2_dynamicBody;
 | 
			
		||||
        circleBodyDef.position.Set(RandomFloat(xLo, xHi), RandomFloat(yLo, yHi));
 | 
			
		||||
 | 
			
		||||
        b2Body* body5 = m_world->CreateBody(&circleBodyDef);
 | 
			
		||||
        body5->CreateFixture(&circleShapeDef);
 | 
			
		||||
 | 
			
		||||
        // Large circle
 | 
			
		||||
        circle.m_radius *= 2.0f;
 | 
			
		||||
        circleBodyDef.position.Set(RandomFloat(xLo, xHi), RandomFloat(yLo, yHi));
 | 
			
		||||
 | 
			
		||||
        b2Body* body6 = m_world->CreateBody(&circleBodyDef);
 | 
			
		||||
        body6->CreateFixture(&circleShapeDef);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Step(Settings* settings)
 | 
			
		||||
    {
 | 
			
		||||
        Test::Step(settings);
 | 
			
		||||
 | 
			
		||||
        // We are going to destroy some bodies according to contact
 | 
			
		||||
        // points. We must buffer the bodies that should be destroyed
 | 
			
		||||
        // because they may belong to multiple contact points.
 | 
			
		||||
        const int32 k_maxNuke = 6;
 | 
			
		||||
        b2Body* nuke[k_maxNuke];
 | 
			
		||||
        int32 nukeCount = 0;
 | 
			
		||||
 | 
			
		||||
        // Traverse the contact results. Destroy bodies that
 | 
			
		||||
        // are touching heavier bodies.
 | 
			
		||||
        for (int32 i = 0; i < m_pointCount; ++i)
 | 
			
		||||
        {
 | 
			
		||||
            ContactPoint* point = m_points + i;
 | 
			
		||||
 | 
			
		||||
            b2Body* body1 = point->fixtureA->GetBody();
 | 
			
		||||
            b2Body* body2 = point->fixtureB->GetBody();
 | 
			
		||||
            float32 mass1 = body1->GetMass();
 | 
			
		||||
            float32 mass2 = body2->GetMass();
 | 
			
		||||
 | 
			
		||||
            if (mass1 > 0.0f && mass2 > 0.0f)
 | 
			
		||||
            {
 | 
			
		||||
                if (mass2 > mass1)
 | 
			
		||||
                {
 | 
			
		||||
                    nuke[nukeCount++] = body1;
 | 
			
		||||
                }
 | 
			
		||||
                else
 | 
			
		||||
                {
 | 
			
		||||
                    nuke[nukeCount++] = body2;
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                if (nukeCount == k_maxNuke)
 | 
			
		||||
                {
 | 
			
		||||
                    break;
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Sort the nuke array to group duplicates.
 | 
			
		||||
        std::sort(nuke, nuke + nukeCount);
 | 
			
		||||
 | 
			
		||||
        // Destroy the bodies, skipping duplicates.
 | 
			
		||||
        int32 i = 0;
 | 
			
		||||
        while (i < nukeCount)
 | 
			
		||||
        {
 | 
			
		||||
            b2Body* b = nuke[i++];
 | 
			
		||||
            while (i < nukeCount && nuke[i] == b)
 | 
			
		||||
            {
 | 
			
		||||
                ++i;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            if (b != m_bomb)
 | 
			
		||||
            {
 | 
			
		||||
                m_world->DestroyBody(b);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new CollisionProcessing;
 | 
			
		||||
    }
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef COLLISION_PROCESSING_H
 | 
			
		||||
#define COLLISION_PROCESSING_H
 | 
			
		||||
 | 
			
		||||
#include <algorithm>
 | 
			
		||||
 | 
			
		||||
// This test shows collision processing and tests
 | 
			
		||||
// deferred body destruction.
 | 
			
		||||
class CollisionProcessing : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
    CollisionProcessing()
 | 
			
		||||
    {
 | 
			
		||||
        // Ground body
 | 
			
		||||
        {
 | 
			
		||||
            b2EdgeShape shape;
 | 
			
		||||
            shape.Set(b2Vec2(-50.0f, 0.0f), b2Vec2(50.0f, 0.0f));
 | 
			
		||||
 | 
			
		||||
            b2FixtureDef sd;
 | 
			
		||||
            sd.shape = &shape;;
 | 
			
		||||
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            b2Body* ground = m_world->CreateBody(&bd);
 | 
			
		||||
            ground->CreateFixture(&sd);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        float32 xLo = -5.0f, xHi = 5.0f;
 | 
			
		||||
        float32 yLo = 2.0f, yHi = 35.0f;
 | 
			
		||||
 | 
			
		||||
        // Small triangle
 | 
			
		||||
        b2Vec2 vertices[3];
 | 
			
		||||
        vertices[0].Set(-1.0f, 0.0f);
 | 
			
		||||
        vertices[1].Set(1.0f, 0.0f);
 | 
			
		||||
        vertices[2].Set(0.0f, 2.0f);
 | 
			
		||||
 | 
			
		||||
        b2PolygonShape polygon;
 | 
			
		||||
        polygon.Set(vertices, 3);
 | 
			
		||||
 | 
			
		||||
        b2FixtureDef triangleShapeDef;
 | 
			
		||||
        triangleShapeDef.shape = &polygon;
 | 
			
		||||
        triangleShapeDef.density = 1.0f;
 | 
			
		||||
 | 
			
		||||
        b2BodyDef triangleBodyDef;
 | 
			
		||||
        triangleBodyDef.type = b2_dynamicBody;
 | 
			
		||||
        triangleBodyDef.position.Set(RandomFloat(xLo, xHi), RandomFloat(yLo, yHi));
 | 
			
		||||
 | 
			
		||||
        b2Body* body1 = m_world->CreateBody(&triangleBodyDef);
 | 
			
		||||
        body1->CreateFixture(&triangleShapeDef);
 | 
			
		||||
 | 
			
		||||
        // Large triangle (recycle definitions)
 | 
			
		||||
        vertices[0] *= 2.0f;
 | 
			
		||||
        vertices[1] *= 2.0f;
 | 
			
		||||
        vertices[2] *= 2.0f;
 | 
			
		||||
        polygon.Set(vertices, 3);
 | 
			
		||||
 | 
			
		||||
        triangleBodyDef.position.Set(RandomFloat(xLo, xHi), RandomFloat(yLo, yHi));
 | 
			
		||||
 | 
			
		||||
        b2Body* body2 = m_world->CreateBody(&triangleBodyDef);
 | 
			
		||||
        body2->CreateFixture(&triangleShapeDef);
 | 
			
		||||
 | 
			
		||||
        // Small box
 | 
			
		||||
        polygon.SetAsBox(1.0f, 0.5f);
 | 
			
		||||
 | 
			
		||||
        b2FixtureDef boxShapeDef;
 | 
			
		||||
        boxShapeDef.shape = &polygon;
 | 
			
		||||
        boxShapeDef.density = 1.0f;
 | 
			
		||||
 | 
			
		||||
        b2BodyDef boxBodyDef;
 | 
			
		||||
        boxBodyDef.type = b2_dynamicBody;
 | 
			
		||||
        boxBodyDef.position.Set(RandomFloat(xLo, xHi), RandomFloat(yLo, yHi));
 | 
			
		||||
 | 
			
		||||
        b2Body* body3 = m_world->CreateBody(&boxBodyDef);
 | 
			
		||||
        body3->CreateFixture(&boxShapeDef);
 | 
			
		||||
 | 
			
		||||
        // Large box (recycle definitions)
 | 
			
		||||
        polygon.SetAsBox(2.0f, 1.0f);
 | 
			
		||||
        boxBodyDef.position.Set(RandomFloat(xLo, xHi), RandomFloat(yLo, yHi));
 | 
			
		||||
 | 
			
		||||
        b2Body* body4 = m_world->CreateBody(&boxBodyDef);
 | 
			
		||||
        body4->CreateFixture(&boxShapeDef);
 | 
			
		||||
 | 
			
		||||
        // Small circle
 | 
			
		||||
        b2CircleShape circle;
 | 
			
		||||
        circle.m_radius = 1.0f;
 | 
			
		||||
 | 
			
		||||
        b2FixtureDef circleShapeDef;
 | 
			
		||||
        circleShapeDef.shape = &circle;
 | 
			
		||||
        circleShapeDef.density = 1.0f;
 | 
			
		||||
 | 
			
		||||
        b2BodyDef circleBodyDef;
 | 
			
		||||
        circleBodyDef.type = b2_dynamicBody;
 | 
			
		||||
        circleBodyDef.position.Set(RandomFloat(xLo, xHi), RandomFloat(yLo, yHi));
 | 
			
		||||
 | 
			
		||||
        b2Body* body5 = m_world->CreateBody(&circleBodyDef);
 | 
			
		||||
        body5->CreateFixture(&circleShapeDef);
 | 
			
		||||
 | 
			
		||||
        // Large circle
 | 
			
		||||
        circle.m_radius *= 2.0f;
 | 
			
		||||
        circleBodyDef.position.Set(RandomFloat(xLo, xHi), RandomFloat(yLo, yHi));
 | 
			
		||||
 | 
			
		||||
        b2Body* body6 = m_world->CreateBody(&circleBodyDef);
 | 
			
		||||
        body6->CreateFixture(&circleShapeDef);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Step(Settings* settings)
 | 
			
		||||
    {
 | 
			
		||||
        Test::Step(settings);
 | 
			
		||||
 | 
			
		||||
        // We are going to destroy some bodies according to contact
 | 
			
		||||
        // points. We must buffer the bodies that should be destroyed
 | 
			
		||||
        // because they may belong to multiple contact points.
 | 
			
		||||
        const int32 k_maxNuke = 6;
 | 
			
		||||
        b2Body* nuke[k_maxNuke];
 | 
			
		||||
        int32 nukeCount = 0;
 | 
			
		||||
 | 
			
		||||
        // Traverse the contact results. Destroy bodies that
 | 
			
		||||
        // are touching heavier bodies.
 | 
			
		||||
        for (int32 i = 0; i < m_pointCount; ++i)
 | 
			
		||||
        {
 | 
			
		||||
            ContactPoint* point = m_points + i;
 | 
			
		||||
 | 
			
		||||
            b2Body* body1 = point->fixtureA->GetBody();
 | 
			
		||||
            b2Body* body2 = point->fixtureB->GetBody();
 | 
			
		||||
            float32 mass1 = body1->GetMass();
 | 
			
		||||
            float32 mass2 = body2->GetMass();
 | 
			
		||||
 | 
			
		||||
            if (mass1 > 0.0f && mass2 > 0.0f)
 | 
			
		||||
            {
 | 
			
		||||
                if (mass2 > mass1)
 | 
			
		||||
                {
 | 
			
		||||
                    nuke[nukeCount++] = body1;
 | 
			
		||||
                }
 | 
			
		||||
                else
 | 
			
		||||
                {
 | 
			
		||||
                    nuke[nukeCount++] = body2;
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                if (nukeCount == k_maxNuke)
 | 
			
		||||
                {
 | 
			
		||||
                    break;
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Sort the nuke array to group duplicates.
 | 
			
		||||
        std::sort(nuke, nuke + nukeCount);
 | 
			
		||||
 | 
			
		||||
        // Destroy the bodies, skipping duplicates.
 | 
			
		||||
        int32 i = 0;
 | 
			
		||||
        while (i < nukeCount)
 | 
			
		||||
        {
 | 
			
		||||
            b2Body* b = nuke[i++];
 | 
			
		||||
            while (i < nukeCount && nuke[i] == b)
 | 
			
		||||
            {
 | 
			
		||||
                ++i;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            if (b != m_bomb)
 | 
			
		||||
            {
 | 
			
		||||
                m_world->DestroyBody(b);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new CollisionProcessing;
 | 
			
		||||
    }
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -1,143 +1,143 @@
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef COMPOUND_SHAPES_H
 | 
			
		||||
#define COMPOUND_SHAPES_H
 | 
			
		||||
 | 
			
		||||
// TODO_ERIN test joints on compounds.
 | 
			
		||||
class CompoundShapes : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
    CompoundShapes()
 | 
			
		||||
    {
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.position.Set(0.0f, 0.0f);
 | 
			
		||||
            b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2EdgeShape shape;
 | 
			
		||||
            shape.Set(b2Vec2(50.0f, 0.0f), b2Vec2(-50.0f, 0.0f));
 | 
			
		||||
 | 
			
		||||
            body->CreateFixture(&shape, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2CircleShape circle1;
 | 
			
		||||
            circle1.m_radius = 0.5f;
 | 
			
		||||
            circle1.m_p.Set(-0.5f, 0.5f);
 | 
			
		||||
 | 
			
		||||
            b2CircleShape circle2;
 | 
			
		||||
            circle2.m_radius = 0.5f;
 | 
			
		||||
            circle2.m_p.Set(0.5f, 0.5f);
 | 
			
		||||
 | 
			
		||||
            for (int i = 0; i < 10; ++i)
 | 
			
		||||
            {
 | 
			
		||||
                float32 x = RandomFloat(-0.1f, 0.1f);
 | 
			
		||||
                b2BodyDef bd;
 | 
			
		||||
                bd.type = b2_dynamicBody;
 | 
			
		||||
                bd.position.Set(x + 5.0f, 1.05f + 2.5f * i);
 | 
			
		||||
                bd.angle = RandomFloat(-b2_pi, b2_pi);
 | 
			
		||||
                b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
                body->CreateFixture(&circle1, 2.0f);
 | 
			
		||||
                body->CreateFixture(&circle2, 0.0f);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2PolygonShape polygon1;
 | 
			
		||||
            polygon1.SetAsBox(0.25f, 0.5f);
 | 
			
		||||
 | 
			
		||||
            b2PolygonShape polygon2;
 | 
			
		||||
            polygon2.SetAsBox(0.25f, 0.5f, b2Vec2(0.0f, -0.5f), 0.5f * b2_pi);
 | 
			
		||||
 | 
			
		||||
            for (int i = 0; i < 10; ++i)
 | 
			
		||||
            {
 | 
			
		||||
                float32 x = RandomFloat(-0.1f, 0.1f);
 | 
			
		||||
                b2BodyDef bd;
 | 
			
		||||
                bd.type = b2_dynamicBody;
 | 
			
		||||
                bd.position.Set(x - 5.0f, 1.05f + 2.5f * i);
 | 
			
		||||
                bd.angle = RandomFloat(-b2_pi, b2_pi);
 | 
			
		||||
                b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
                body->CreateFixture(&polygon1, 2.0f);
 | 
			
		||||
                body->CreateFixture(&polygon2, 2.0f);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2Transform xf1;
 | 
			
		||||
            xf1.q.Set(0.3524f * b2_pi);
 | 
			
		||||
            xf1.p = xf1.q.GetXAxis();
 | 
			
		||||
 | 
			
		||||
            b2Vec2 vertices[3];
 | 
			
		||||
 | 
			
		||||
            b2PolygonShape triangle1;
 | 
			
		||||
            vertices[0] = b2Mul(xf1, b2Vec2(-1.0f, 0.0f));
 | 
			
		||||
            vertices[1] = b2Mul(xf1, b2Vec2(1.0f, 0.0f));
 | 
			
		||||
            vertices[2] = b2Mul(xf1, b2Vec2(0.0f, 0.5f));
 | 
			
		||||
            triangle1.Set(vertices, 3);
 | 
			
		||||
 | 
			
		||||
            b2Transform xf2;
 | 
			
		||||
            xf2.q.Set(-0.3524f * b2_pi);
 | 
			
		||||
            xf2.p = -xf2.q.GetXAxis();
 | 
			
		||||
 | 
			
		||||
            b2PolygonShape triangle2;
 | 
			
		||||
            vertices[0] = b2Mul(xf2, b2Vec2(-1.0f, 0.0f));
 | 
			
		||||
            vertices[1] = b2Mul(xf2, b2Vec2(1.0f, 0.0f));
 | 
			
		||||
            vertices[2] = b2Mul(xf2, b2Vec2(0.0f, 0.5f));
 | 
			
		||||
            triangle2.Set(vertices, 3);
 | 
			
		||||
 | 
			
		||||
            for (int32 i = 0; i < 10; ++i)
 | 
			
		||||
            {
 | 
			
		||||
                float32 x = RandomFloat(-0.1f, 0.1f);
 | 
			
		||||
                b2BodyDef bd;
 | 
			
		||||
                bd.type = b2_dynamicBody;
 | 
			
		||||
                bd.position.Set(x, 2.05f + 2.5f * i);
 | 
			
		||||
                bd.angle = 0.0f;
 | 
			
		||||
                b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
                body->CreateFixture(&triangle1, 2.0f);
 | 
			
		||||
                body->CreateFixture(&triangle2, 2.0f);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2PolygonShape bottom;
 | 
			
		||||
            bottom.SetAsBox( 1.5f, 0.15f );
 | 
			
		||||
 | 
			
		||||
            b2PolygonShape left;
 | 
			
		||||
            left.SetAsBox(0.15f, 2.7f, b2Vec2(-1.45f, 2.35f), 0.2f);
 | 
			
		||||
 | 
			
		||||
            b2PolygonShape right;
 | 
			
		||||
            right.SetAsBox(0.15f, 2.7f, b2Vec2(1.45f, 2.35f), -0.2f);
 | 
			
		||||
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
            bd.position.Set( 0.0f, 2.0f );
 | 
			
		||||
            b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
            body->CreateFixture(&bottom, 4.0f);
 | 
			
		||||
            body->CreateFixture(&left, 4.0f);
 | 
			
		||||
            body->CreateFixture(&right, 4.0f);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new CompoundShapes;
 | 
			
		||||
    }
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef COMPOUND_SHAPES_H
 | 
			
		||||
#define COMPOUND_SHAPES_H
 | 
			
		||||
 | 
			
		||||
// TODO_ERIN test joints on compounds.
 | 
			
		||||
class CompoundShapes : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
    CompoundShapes()
 | 
			
		||||
    {
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.position.Set(0.0f, 0.0f);
 | 
			
		||||
            b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2EdgeShape shape;
 | 
			
		||||
            shape.Set(b2Vec2(50.0f, 0.0f), b2Vec2(-50.0f, 0.0f));
 | 
			
		||||
 | 
			
		||||
            body->CreateFixture(&shape, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2CircleShape circle1;
 | 
			
		||||
            circle1.m_radius = 0.5f;
 | 
			
		||||
            circle1.m_p.Set(-0.5f, 0.5f);
 | 
			
		||||
 | 
			
		||||
            b2CircleShape circle2;
 | 
			
		||||
            circle2.m_radius = 0.5f;
 | 
			
		||||
            circle2.m_p.Set(0.5f, 0.5f);
 | 
			
		||||
 | 
			
		||||
            for (int i = 0; i < 10; ++i)
 | 
			
		||||
            {
 | 
			
		||||
                float32 x = RandomFloat(-0.1f, 0.1f);
 | 
			
		||||
                b2BodyDef bd;
 | 
			
		||||
                bd.type = b2_dynamicBody;
 | 
			
		||||
                bd.position.Set(x + 5.0f, 1.05f + 2.5f * i);
 | 
			
		||||
                bd.angle = RandomFloat(-b2_pi, b2_pi);
 | 
			
		||||
                b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
                body->CreateFixture(&circle1, 2.0f);
 | 
			
		||||
                body->CreateFixture(&circle2, 0.0f);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2PolygonShape polygon1;
 | 
			
		||||
            polygon1.SetAsBox(0.25f, 0.5f);
 | 
			
		||||
 | 
			
		||||
            b2PolygonShape polygon2;
 | 
			
		||||
            polygon2.SetAsBox(0.25f, 0.5f, b2Vec2(0.0f, -0.5f), 0.5f * b2_pi);
 | 
			
		||||
 | 
			
		||||
            for (int i = 0; i < 10; ++i)
 | 
			
		||||
            {
 | 
			
		||||
                float32 x = RandomFloat(-0.1f, 0.1f);
 | 
			
		||||
                b2BodyDef bd;
 | 
			
		||||
                bd.type = b2_dynamicBody;
 | 
			
		||||
                bd.position.Set(x - 5.0f, 1.05f + 2.5f * i);
 | 
			
		||||
                bd.angle = RandomFloat(-b2_pi, b2_pi);
 | 
			
		||||
                b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
                body->CreateFixture(&polygon1, 2.0f);
 | 
			
		||||
                body->CreateFixture(&polygon2, 2.0f);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2Transform xf1;
 | 
			
		||||
            xf1.q.Set(0.3524f * b2_pi);
 | 
			
		||||
            xf1.p = xf1.q.GetXAxis();
 | 
			
		||||
 | 
			
		||||
            b2Vec2 vertices[3];
 | 
			
		||||
 | 
			
		||||
            b2PolygonShape triangle1;
 | 
			
		||||
            vertices[0] = b2Mul(xf1, b2Vec2(-1.0f, 0.0f));
 | 
			
		||||
            vertices[1] = b2Mul(xf1, b2Vec2(1.0f, 0.0f));
 | 
			
		||||
            vertices[2] = b2Mul(xf1, b2Vec2(0.0f, 0.5f));
 | 
			
		||||
            triangle1.Set(vertices, 3);
 | 
			
		||||
 | 
			
		||||
            b2Transform xf2;
 | 
			
		||||
            xf2.q.Set(-0.3524f * b2_pi);
 | 
			
		||||
            xf2.p = -xf2.q.GetXAxis();
 | 
			
		||||
 | 
			
		||||
            b2PolygonShape triangle2;
 | 
			
		||||
            vertices[0] = b2Mul(xf2, b2Vec2(-1.0f, 0.0f));
 | 
			
		||||
            vertices[1] = b2Mul(xf2, b2Vec2(1.0f, 0.0f));
 | 
			
		||||
            vertices[2] = b2Mul(xf2, b2Vec2(0.0f, 0.5f));
 | 
			
		||||
            triangle2.Set(vertices, 3);
 | 
			
		||||
 | 
			
		||||
            for (int32 i = 0; i < 10; ++i)
 | 
			
		||||
            {
 | 
			
		||||
                float32 x = RandomFloat(-0.1f, 0.1f);
 | 
			
		||||
                b2BodyDef bd;
 | 
			
		||||
                bd.type = b2_dynamicBody;
 | 
			
		||||
                bd.position.Set(x, 2.05f + 2.5f * i);
 | 
			
		||||
                bd.angle = 0.0f;
 | 
			
		||||
                b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
                body->CreateFixture(&triangle1, 2.0f);
 | 
			
		||||
                body->CreateFixture(&triangle2, 2.0f);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2PolygonShape bottom;
 | 
			
		||||
            bottom.SetAsBox( 1.5f, 0.15f );
 | 
			
		||||
 | 
			
		||||
            b2PolygonShape left;
 | 
			
		||||
            left.SetAsBox(0.15f, 2.7f, b2Vec2(-1.45f, 2.35f), 0.2f);
 | 
			
		||||
 | 
			
		||||
            b2PolygonShape right;
 | 
			
		||||
            right.SetAsBox(0.15f, 2.7f, b2Vec2(1.45f, 2.35f), -0.2f);
 | 
			
		||||
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
            bd.position.Set( 0.0f, 2.0f );
 | 
			
		||||
            b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
            body->CreateFixture(&bottom, 4.0f);
 | 
			
		||||
            body->CreateFixture(&left, 4.0f);
 | 
			
		||||
            body->CreateFixture(&right, 4.0f);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new CompoundShapes;
 | 
			
		||||
    }
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -1,167 +1,167 @@
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2009 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef CONFINED_H
 | 
			
		||||
#define CONFINED_H
 | 
			
		||||
 | 
			
		||||
class Confined : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
 | 
			
		||||
    enum
 | 
			
		||||
    {
 | 
			
		||||
        e_columnCount = 0,
 | 
			
		||||
        e_rowCount = 0
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    Confined()
 | 
			
		||||
    {
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            b2Body* ground = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2EdgeShape shape;
 | 
			
		||||
 | 
			
		||||
            // Floor
 | 
			
		||||
            shape.Set(b2Vec2(-10.0f, 0.0f), b2Vec2(10.0f, 0.0f));
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
 | 
			
		||||
            // Left wall
 | 
			
		||||
            shape.Set(b2Vec2(-10.0f, 0.0f), b2Vec2(-10.0f, 20.0f));
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
 | 
			
		||||
            // Right wall
 | 
			
		||||
            shape.Set(b2Vec2(10.0f, 0.0f), b2Vec2(10.0f, 20.0f));
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
 | 
			
		||||
            // Roof
 | 
			
		||||
            shape.Set(b2Vec2(-10.0f, 20.0f), b2Vec2(10.0f, 20.0f));
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        float32 radius = 0.5f;
 | 
			
		||||
        b2CircleShape shape;
 | 
			
		||||
        shape.m_p.SetZero();
 | 
			
		||||
        shape.m_radius = radius;
 | 
			
		||||
 | 
			
		||||
        b2FixtureDef fd;
 | 
			
		||||
        fd.shape = &shape;
 | 
			
		||||
        fd.density = 1.0f;
 | 
			
		||||
        fd.friction = 0.1f;
 | 
			
		||||
 | 
			
		||||
        for (int32 j = 0; j < e_columnCount; ++j)
 | 
			
		||||
        {
 | 
			
		||||
            for (int i = 0; i < e_rowCount; ++i)
 | 
			
		||||
            {
 | 
			
		||||
                b2BodyDef bd;
 | 
			
		||||
                bd.type = b2_dynamicBody;
 | 
			
		||||
                bd.position.Set(-10.0f + (2.1f * j + 1.0f + 0.01f * i) * radius, (2.0f * i + 1.0f) * radius);
 | 
			
		||||
                b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
                body->CreateFixture(&fd);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        m_world->SetGravity(b2Vec2(0.0f, 0.0f));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void CreateCircle()
 | 
			
		||||
    {
 | 
			
		||||
        float32 radius = 2.0f;
 | 
			
		||||
        b2CircleShape shape;
 | 
			
		||||
        shape.m_p.SetZero();
 | 
			
		||||
        shape.m_radius = radius;
 | 
			
		||||
 | 
			
		||||
        b2FixtureDef fd;
 | 
			
		||||
        fd.shape = &shape;
 | 
			
		||||
        fd.density = 1.0f;
 | 
			
		||||
        fd.friction = 0.0f;
 | 
			
		||||
 | 
			
		||||
        b2Vec2 p(RandomFloat(), 3.0f + RandomFloat());
 | 
			
		||||
        b2BodyDef bd;
 | 
			
		||||
        bd.type = b2_dynamicBody;
 | 
			
		||||
        bd.position = p;
 | 
			
		||||
        //bd.allowSleep = false;
 | 
			
		||||
        b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
        body->CreateFixture(&fd);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Keyboard(unsigned char key)
 | 
			
		||||
    {
 | 
			
		||||
        switch (key)
 | 
			
		||||
        {
 | 
			
		||||
        case 'c':
 | 
			
		||||
            CreateCircle();
 | 
			
		||||
            break;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Step(Settings* settings)
 | 
			
		||||
    {
 | 
			
		||||
        bool sleeping = true;
 | 
			
		||||
        for (b2Body* b = m_world->GetBodyList(); b; b = b->GetNext())
 | 
			
		||||
        {
 | 
			
		||||
            if (b->GetType() != b2_dynamicBody)
 | 
			
		||||
            {
 | 
			
		||||
                continue;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            if (b->IsAwake())
 | 
			
		||||
            {
 | 
			
		||||
                sleeping = false;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (m_stepCount == 180)
 | 
			
		||||
        {
 | 
			
		||||
            m_stepCount += 0;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        //if (sleeping)
 | 
			
		||||
        //{
 | 
			
		||||
        //  CreateCircle();
 | 
			
		||||
        //}
 | 
			
		||||
 | 
			
		||||
        Test::Step(settings);
 | 
			
		||||
 | 
			
		||||
        for (b2Body* b = m_world->GetBodyList(); b; b = b->GetNext())
 | 
			
		||||
        {
 | 
			
		||||
            if (b->GetType() != b2_dynamicBody)
 | 
			
		||||
            {
 | 
			
		||||
                continue;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            b2Vec2 p = b->GetPosition();
 | 
			
		||||
            if (p.x <= -10.0f || 10.0f <= p.x || p.y <= 0.0f || 20.0f <= p.y)
 | 
			
		||||
            {
 | 
			
		||||
                p.x += 0.0;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        m_debugDraw.DrawString(5, m_textLine, "Press 'c' to create a circle.");
 | 
			
		||||
        m_textLine += 15;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new Confined;
 | 
			
		||||
    }
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2009 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef CONFINED_H
 | 
			
		||||
#define CONFINED_H
 | 
			
		||||
 | 
			
		||||
class Confined : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
 | 
			
		||||
    enum
 | 
			
		||||
    {
 | 
			
		||||
        e_columnCount = 0,
 | 
			
		||||
        e_rowCount = 0
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    Confined()
 | 
			
		||||
    {
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            b2Body* ground = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2EdgeShape shape;
 | 
			
		||||
 | 
			
		||||
            // Floor
 | 
			
		||||
            shape.Set(b2Vec2(-10.0f, 0.0f), b2Vec2(10.0f, 0.0f));
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
 | 
			
		||||
            // Left wall
 | 
			
		||||
            shape.Set(b2Vec2(-10.0f, 0.0f), b2Vec2(-10.0f, 20.0f));
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
 | 
			
		||||
            // Right wall
 | 
			
		||||
            shape.Set(b2Vec2(10.0f, 0.0f), b2Vec2(10.0f, 20.0f));
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
 | 
			
		||||
            // Roof
 | 
			
		||||
            shape.Set(b2Vec2(-10.0f, 20.0f), b2Vec2(10.0f, 20.0f));
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        float32 radius = 0.5f;
 | 
			
		||||
        b2CircleShape shape;
 | 
			
		||||
        shape.m_p.SetZero();
 | 
			
		||||
        shape.m_radius = radius;
 | 
			
		||||
 | 
			
		||||
        b2FixtureDef fd;
 | 
			
		||||
        fd.shape = &shape;
 | 
			
		||||
        fd.density = 1.0f;
 | 
			
		||||
        fd.friction = 0.1f;
 | 
			
		||||
 | 
			
		||||
        for (int32 j = 0; j < e_columnCount; ++j)
 | 
			
		||||
        {
 | 
			
		||||
            for (int i = 0; i < e_rowCount; ++i)
 | 
			
		||||
            {
 | 
			
		||||
                b2BodyDef bd;
 | 
			
		||||
                bd.type = b2_dynamicBody;
 | 
			
		||||
                bd.position.Set(-10.0f + (2.1f * j + 1.0f + 0.01f * i) * radius, (2.0f * i + 1.0f) * radius);
 | 
			
		||||
                b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
                body->CreateFixture(&fd);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        m_world->SetGravity(b2Vec2(0.0f, 0.0f));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void CreateCircle()
 | 
			
		||||
    {
 | 
			
		||||
        float32 radius = 2.0f;
 | 
			
		||||
        b2CircleShape shape;
 | 
			
		||||
        shape.m_p.SetZero();
 | 
			
		||||
        shape.m_radius = radius;
 | 
			
		||||
 | 
			
		||||
        b2FixtureDef fd;
 | 
			
		||||
        fd.shape = &shape;
 | 
			
		||||
        fd.density = 1.0f;
 | 
			
		||||
        fd.friction = 0.0f;
 | 
			
		||||
 | 
			
		||||
        b2Vec2 p(RandomFloat(), 3.0f + RandomFloat());
 | 
			
		||||
        b2BodyDef bd;
 | 
			
		||||
        bd.type = b2_dynamicBody;
 | 
			
		||||
        bd.position = p;
 | 
			
		||||
        //bd.allowSleep = false;
 | 
			
		||||
        b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
        body->CreateFixture(&fd);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Keyboard(unsigned char key)
 | 
			
		||||
    {
 | 
			
		||||
        switch (key)
 | 
			
		||||
        {
 | 
			
		||||
        case 'c':
 | 
			
		||||
            CreateCircle();
 | 
			
		||||
            break;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Step(Settings* settings)
 | 
			
		||||
    {
 | 
			
		||||
        bool sleeping = true;
 | 
			
		||||
        for (b2Body* b = m_world->GetBodyList(); b; b = b->GetNext())
 | 
			
		||||
        {
 | 
			
		||||
            if (b->GetType() != b2_dynamicBody)
 | 
			
		||||
            {
 | 
			
		||||
                continue;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            if (b->IsAwake())
 | 
			
		||||
            {
 | 
			
		||||
                sleeping = false;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (m_stepCount == 180)
 | 
			
		||||
        {
 | 
			
		||||
            m_stepCount += 0;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        //if (sleeping)
 | 
			
		||||
        //{
 | 
			
		||||
        //  CreateCircle();
 | 
			
		||||
        //}
 | 
			
		||||
 | 
			
		||||
        Test::Step(settings);
 | 
			
		||||
 | 
			
		||||
        for (b2Body* b = m_world->GetBodyList(); b; b = b->GetNext())
 | 
			
		||||
        {
 | 
			
		||||
            if (b->GetType() != b2_dynamicBody)
 | 
			
		||||
            {
 | 
			
		||||
                continue;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            b2Vec2 p = b->GetPosition();
 | 
			
		||||
            if (p.x <= -10.0f || 10.0f <= p.x || p.y <= 0.0f || 20.0f <= p.y)
 | 
			
		||||
            {
 | 
			
		||||
                p.x += 0.0;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        m_debugDraw.DrawString(5, m_textLine, "Press 'c' to create a circle.");
 | 
			
		||||
        m_textLine += 15;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new Confined;
 | 
			
		||||
    }
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -1,137 +1,137 @@
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef CONTINUOUS_TEST_H
 | 
			
		||||
#define CONTINUOUS_TEST_H
 | 
			
		||||
 | 
			
		||||
class ContinuousTest : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
 | 
			
		||||
    ContinuousTest()
 | 
			
		||||
    {
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.position.Set(0.0f, 0.0f);
 | 
			
		||||
            b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2EdgeShape edge;
 | 
			
		||||
 | 
			
		||||
            edge.Set(b2Vec2(-10.0f, 0.0f), b2Vec2(10.0f, 0.0f));
 | 
			
		||||
            body->CreateFixture(&edge, 0.0f);
 | 
			
		||||
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(0.2f, 1.0f, b2Vec2(0.5f, 1.0f), 0.0f);
 | 
			
		||||
            body->CreateFixture(&shape, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
#if 1
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
            bd.position.Set(0.0f, 20.0f);
 | 
			
		||||
            //bd.angle = 0.1f;
 | 
			
		||||
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(2.0f, 0.1f);
 | 
			
		||||
 | 
			
		||||
            m_body = m_world->CreateBody(&bd);
 | 
			
		||||
            m_body->CreateFixture(&shape, 1.0f);
 | 
			
		||||
 | 
			
		||||
            m_angularVelocity = RandomFloat(-50.0f, 50.0f);
 | 
			
		||||
            //m_angularVelocity = 46.661274f;
 | 
			
		||||
            m_body->SetLinearVelocity(b2Vec2(0.0f, -100.0f));
 | 
			
		||||
            m_body->SetAngularVelocity(m_angularVelocity);
 | 
			
		||||
        }
 | 
			
		||||
#else
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
            bd.position.Set(0.0f, 2.0f);
 | 
			
		||||
            b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2CircleShape shape;
 | 
			
		||||
            shape.m_p.SetZero();
 | 
			
		||||
            shape.m_radius = 0.5f;
 | 
			
		||||
            body->CreateFixture(&shape, 1.0f);
 | 
			
		||||
 | 
			
		||||
            bd.bullet = true;
 | 
			
		||||
            bd.position.Set(0.0f, 10.0f);
 | 
			
		||||
            body = m_world->CreateBody(&bd);
 | 
			
		||||
            body->CreateFixture(&shape, 1.0f);
 | 
			
		||||
            body->SetLinearVelocity(b2Vec2(0.0f, -100.0f));
 | 
			
		||||
        }
 | 
			
		||||
#endif
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Launch()
 | 
			
		||||
    {
 | 
			
		||||
        m_body->SetTransform(b2Vec2(0.0f, 20.0f), 0.0f);
 | 
			
		||||
        m_angularVelocity = RandomFloat(-50.0f, 50.0f);
 | 
			
		||||
        m_body->SetLinearVelocity(b2Vec2(0.0f, -100.0f));
 | 
			
		||||
        m_body->SetAngularVelocity(m_angularVelocity);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Step(Settings* settings)
 | 
			
		||||
    {
 | 
			
		||||
        if (m_stepCount == 12)
 | 
			
		||||
        {
 | 
			
		||||
            m_stepCount += 0;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        Test::Step(settings);
 | 
			
		||||
 | 
			
		||||
        extern int32 b2_gjkCalls, b2_gjkIters, b2_gjkMaxIters;
 | 
			
		||||
 | 
			
		||||
        if (b2_gjkCalls > 0)
 | 
			
		||||
        {
 | 
			
		||||
            m_debugDraw.DrawString(5, m_textLine, "gjk calls = %d, ave gjk iters = %3.1f, max gjk iters = %d",
 | 
			
		||||
                b2_gjkCalls, b2_gjkIters / float32(b2_gjkCalls), b2_gjkMaxIters);
 | 
			
		||||
            m_textLine += 15;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        extern int32 b2_toiCalls, b2_toiIters;
 | 
			
		||||
        extern int32 b2_toiRootIters, b2_toiMaxRootIters;
 | 
			
		||||
 | 
			
		||||
        if (b2_toiCalls > 0)
 | 
			
		||||
        {
 | 
			
		||||
            m_debugDraw.DrawString(5, m_textLine, "toi calls = %d, ave toi iters = %3.1f, max toi iters = %d",
 | 
			
		||||
                                b2_toiCalls, b2_toiIters / float32(b2_toiCalls), b2_toiMaxRootIters);
 | 
			
		||||
            m_textLine += 15;
 | 
			
		||||
 | 
			
		||||
            m_debugDraw.DrawString(5, m_textLine, "ave toi root iters = %3.1f, max toi root iters = %d",
 | 
			
		||||
                b2_toiRootIters / float32(b2_toiCalls), b2_toiMaxRootIters);
 | 
			
		||||
            m_textLine += 15;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (m_stepCount % 60 == 0)
 | 
			
		||||
        {
 | 
			
		||||
            //Launch();
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new ContinuousTest;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    b2Body* m_body;
 | 
			
		||||
    float32 m_angularVelocity;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef CONTINUOUS_TEST_H
 | 
			
		||||
#define CONTINUOUS_TEST_H
 | 
			
		||||
 | 
			
		||||
class ContinuousTest : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
 | 
			
		||||
    ContinuousTest()
 | 
			
		||||
    {
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.position.Set(0.0f, 0.0f);
 | 
			
		||||
            b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2EdgeShape edge;
 | 
			
		||||
 | 
			
		||||
            edge.Set(b2Vec2(-10.0f, 0.0f), b2Vec2(10.0f, 0.0f));
 | 
			
		||||
            body->CreateFixture(&edge, 0.0f);
 | 
			
		||||
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(0.2f, 1.0f, b2Vec2(0.5f, 1.0f), 0.0f);
 | 
			
		||||
            body->CreateFixture(&shape, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
#if 1
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
            bd.position.Set(0.0f, 20.0f);
 | 
			
		||||
            //bd.angle = 0.1f;
 | 
			
		||||
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(2.0f, 0.1f);
 | 
			
		||||
 | 
			
		||||
            m_body = m_world->CreateBody(&bd);
 | 
			
		||||
            m_body->CreateFixture(&shape, 1.0f);
 | 
			
		||||
 | 
			
		||||
            m_angularVelocity = RandomFloat(-50.0f, 50.0f);
 | 
			
		||||
            //m_angularVelocity = 46.661274f;
 | 
			
		||||
            m_body->SetLinearVelocity(b2Vec2(0.0f, -100.0f));
 | 
			
		||||
            m_body->SetAngularVelocity(m_angularVelocity);
 | 
			
		||||
        }
 | 
			
		||||
#else
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
            bd.position.Set(0.0f, 2.0f);
 | 
			
		||||
            b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2CircleShape shape;
 | 
			
		||||
            shape.m_p.SetZero();
 | 
			
		||||
            shape.m_radius = 0.5f;
 | 
			
		||||
            body->CreateFixture(&shape, 1.0f);
 | 
			
		||||
 | 
			
		||||
            bd.bullet = true;
 | 
			
		||||
            bd.position.Set(0.0f, 10.0f);
 | 
			
		||||
            body = m_world->CreateBody(&bd);
 | 
			
		||||
            body->CreateFixture(&shape, 1.0f);
 | 
			
		||||
            body->SetLinearVelocity(b2Vec2(0.0f, -100.0f));
 | 
			
		||||
        }
 | 
			
		||||
#endif
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Launch()
 | 
			
		||||
    {
 | 
			
		||||
        m_body->SetTransform(b2Vec2(0.0f, 20.0f), 0.0f);
 | 
			
		||||
        m_angularVelocity = RandomFloat(-50.0f, 50.0f);
 | 
			
		||||
        m_body->SetLinearVelocity(b2Vec2(0.0f, -100.0f));
 | 
			
		||||
        m_body->SetAngularVelocity(m_angularVelocity);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Step(Settings* settings)
 | 
			
		||||
    {
 | 
			
		||||
        if (m_stepCount == 12)
 | 
			
		||||
        {
 | 
			
		||||
            m_stepCount += 0;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        Test::Step(settings);
 | 
			
		||||
 | 
			
		||||
        extern int32 b2_gjkCalls, b2_gjkIters, b2_gjkMaxIters;
 | 
			
		||||
 | 
			
		||||
        if (b2_gjkCalls > 0)
 | 
			
		||||
        {
 | 
			
		||||
            m_debugDraw.DrawString(5, m_textLine, "gjk calls = %d, ave gjk iters = %3.1f, max gjk iters = %d",
 | 
			
		||||
                b2_gjkCalls, b2_gjkIters / float32(b2_gjkCalls), b2_gjkMaxIters);
 | 
			
		||||
            m_textLine += 15;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        extern int32 b2_toiCalls, b2_toiIters;
 | 
			
		||||
        extern int32 b2_toiRootIters, b2_toiMaxRootIters;
 | 
			
		||||
 | 
			
		||||
        if (b2_toiCalls > 0)
 | 
			
		||||
        {
 | 
			
		||||
            m_debugDraw.DrawString(5, m_textLine, "toi calls = %d, ave toi iters = %3.1f, max toi iters = %d",
 | 
			
		||||
                                b2_toiCalls, b2_toiIters / float32(b2_toiCalls), b2_toiMaxRootIters);
 | 
			
		||||
            m_textLine += 15;
 | 
			
		||||
 | 
			
		||||
            m_debugDraw.DrawString(5, m_textLine, "ave toi root iters = %3.1f, max toi root iters = %d",
 | 
			
		||||
                b2_toiRootIters / float32(b2_toiCalls), b2_toiMaxRootIters);
 | 
			
		||||
            m_textLine += 15;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (m_stepCount % 60 == 0)
 | 
			
		||||
        {
 | 
			
		||||
            //Launch();
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new ContinuousTest;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    b2Body* m_body;
 | 
			
		||||
    float32 m_angularVelocity;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -1,135 +1,135 @@
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef DISTANCE_TEST_H
 | 
			
		||||
#define DISTANCE_TEST_H
 | 
			
		||||
 | 
			
		||||
class DistanceTest : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
    DistanceTest()
 | 
			
		||||
    {
 | 
			
		||||
        {
 | 
			
		||||
            m_transformA.SetIdentity();
 | 
			
		||||
            m_transformA.p.Set(0.0f, -0.2f);
 | 
			
		||||
            m_polygonA.SetAsBox(10.0f, 0.2f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            m_positionB.Set(12.017401f, 0.13678508f);
 | 
			
		||||
            m_angleB = -0.0109265f;
 | 
			
		||||
            m_transformB.Set(m_positionB, m_angleB);
 | 
			
		||||
 | 
			
		||||
            m_polygonB.SetAsBox(2.0f, 0.1f);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new DistanceTest;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Step(Settings* settings)
 | 
			
		||||
    {
 | 
			
		||||
        Test::Step(settings);
 | 
			
		||||
 | 
			
		||||
        b2DistanceInput input;
 | 
			
		||||
        input.proxyA.Set(&m_polygonA, 0);
 | 
			
		||||
        input.proxyB.Set(&m_polygonB, 0);
 | 
			
		||||
        input.transformA = m_transformA;
 | 
			
		||||
        input.transformB = m_transformB;
 | 
			
		||||
        input.useRadii = true;
 | 
			
		||||
        b2SimplexCache cache;
 | 
			
		||||
        cache.count = 0;
 | 
			
		||||
        b2DistanceOutput output;
 | 
			
		||||
        b2Distance(&output, &cache, &input);
 | 
			
		||||
 | 
			
		||||
        m_debugDraw.DrawString(5, m_textLine, "distance = %g", output.distance);
 | 
			
		||||
        m_textLine += 15;
 | 
			
		||||
 | 
			
		||||
        m_debugDraw.DrawString(5, m_textLine, "iterations = %d", output.iterations);
 | 
			
		||||
        m_textLine += 15;
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2Color color(0.9f, 0.9f, 0.9f);
 | 
			
		||||
            b2Vec2 v[b2_maxPolygonVertices];
 | 
			
		||||
            for (int32 i = 0; i < m_polygonA.m_vertexCount; ++i)
 | 
			
		||||
            {
 | 
			
		||||
                v[i] = b2Mul(m_transformA, m_polygonA.m_vertices[i]);
 | 
			
		||||
            }
 | 
			
		||||
            m_debugDraw.DrawPolygon(v, m_polygonA.m_vertexCount, color);
 | 
			
		||||
 | 
			
		||||
            for (int32 i = 0; i < m_polygonB.m_vertexCount; ++i)
 | 
			
		||||
            {
 | 
			
		||||
                v[i] = b2Mul(m_transformB, m_polygonB.m_vertices[i]);
 | 
			
		||||
            }
 | 
			
		||||
            m_debugDraw.DrawPolygon(v, m_polygonB.m_vertexCount, color);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        b2Vec2 x1 = output.pointA;
 | 
			
		||||
        b2Vec2 x2 = output.pointB;
 | 
			
		||||
 | 
			
		||||
        b2Color c1(1.0f, 0.0f, 0.0f);
 | 
			
		||||
        m_debugDraw.DrawPoint(x1, 4.0f, c1);
 | 
			
		||||
 | 
			
		||||
        b2Color c2(1.0f, 1.0f, 0.0f);
 | 
			
		||||
        m_debugDraw.DrawPoint(x2, 4.0f, c2);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Keyboard(unsigned char key)
 | 
			
		||||
    {
 | 
			
		||||
        switch (key)
 | 
			
		||||
        {
 | 
			
		||||
        case 'a':
 | 
			
		||||
            m_positionB.x -= 0.1f;
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case 'd':
 | 
			
		||||
            m_positionB.x += 0.1f;
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case 's':
 | 
			
		||||
            m_positionB.y -= 0.1f;
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case 'w':
 | 
			
		||||
            m_positionB.y += 0.1f;
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case 'q':
 | 
			
		||||
            m_angleB += 0.1f * b2_pi;
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case 'e':
 | 
			
		||||
            m_angleB -= 0.1f * b2_pi;
 | 
			
		||||
            break;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        m_transformB.Set(m_positionB, m_angleB);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    b2Vec2 m_positionB;
 | 
			
		||||
    float32 m_angleB;
 | 
			
		||||
 | 
			
		||||
    b2Transform m_transformA;
 | 
			
		||||
    b2Transform m_transformB;
 | 
			
		||||
    b2PolygonShape m_polygonA;
 | 
			
		||||
    b2PolygonShape m_polygonB;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef DISTANCE_TEST_H
 | 
			
		||||
#define DISTANCE_TEST_H
 | 
			
		||||
 | 
			
		||||
class DistanceTest : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
    DistanceTest()
 | 
			
		||||
    {
 | 
			
		||||
        {
 | 
			
		||||
            m_transformA.SetIdentity();
 | 
			
		||||
            m_transformA.p.Set(0.0f, -0.2f);
 | 
			
		||||
            m_polygonA.SetAsBox(10.0f, 0.2f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            m_positionB.Set(12.017401f, 0.13678508f);
 | 
			
		||||
            m_angleB = -0.0109265f;
 | 
			
		||||
            m_transformB.Set(m_positionB, m_angleB);
 | 
			
		||||
 | 
			
		||||
            m_polygonB.SetAsBox(2.0f, 0.1f);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new DistanceTest;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Step(Settings* settings)
 | 
			
		||||
    {
 | 
			
		||||
        Test::Step(settings);
 | 
			
		||||
 | 
			
		||||
        b2DistanceInput input;
 | 
			
		||||
        input.proxyA.Set(&m_polygonA, 0);
 | 
			
		||||
        input.proxyB.Set(&m_polygonB, 0);
 | 
			
		||||
        input.transformA = m_transformA;
 | 
			
		||||
        input.transformB = m_transformB;
 | 
			
		||||
        input.useRadii = true;
 | 
			
		||||
        b2SimplexCache cache;
 | 
			
		||||
        cache.count = 0;
 | 
			
		||||
        b2DistanceOutput output;
 | 
			
		||||
        b2Distance(&output, &cache, &input);
 | 
			
		||||
 | 
			
		||||
        m_debugDraw.DrawString(5, m_textLine, "distance = %g", output.distance);
 | 
			
		||||
        m_textLine += 15;
 | 
			
		||||
 | 
			
		||||
        m_debugDraw.DrawString(5, m_textLine, "iterations = %d", output.iterations);
 | 
			
		||||
        m_textLine += 15;
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2Color color(0.9f, 0.9f, 0.9f);
 | 
			
		||||
            b2Vec2 v[b2_maxPolygonVertices];
 | 
			
		||||
            for (int32 i = 0; i < m_polygonA.m_vertexCount; ++i)
 | 
			
		||||
            {
 | 
			
		||||
                v[i] = b2Mul(m_transformA, m_polygonA.m_vertices[i]);
 | 
			
		||||
            }
 | 
			
		||||
            m_debugDraw.DrawPolygon(v, m_polygonA.m_vertexCount, color);
 | 
			
		||||
 | 
			
		||||
            for (int32 i = 0; i < m_polygonB.m_vertexCount; ++i)
 | 
			
		||||
            {
 | 
			
		||||
                v[i] = b2Mul(m_transformB, m_polygonB.m_vertices[i]);
 | 
			
		||||
            }
 | 
			
		||||
            m_debugDraw.DrawPolygon(v, m_polygonB.m_vertexCount, color);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        b2Vec2 x1 = output.pointA;
 | 
			
		||||
        b2Vec2 x2 = output.pointB;
 | 
			
		||||
 | 
			
		||||
        b2Color c1(1.0f, 0.0f, 0.0f);
 | 
			
		||||
        m_debugDraw.DrawPoint(x1, 4.0f, c1);
 | 
			
		||||
 | 
			
		||||
        b2Color c2(1.0f, 1.0f, 0.0f);
 | 
			
		||||
        m_debugDraw.DrawPoint(x2, 4.0f, c2);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Keyboard(unsigned char key)
 | 
			
		||||
    {
 | 
			
		||||
        switch (key)
 | 
			
		||||
        {
 | 
			
		||||
        case 'a':
 | 
			
		||||
            m_positionB.x -= 0.1f;
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case 'd':
 | 
			
		||||
            m_positionB.x += 0.1f;
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case 's':
 | 
			
		||||
            m_positionB.y -= 0.1f;
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case 'w':
 | 
			
		||||
            m_positionB.y += 0.1f;
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case 'q':
 | 
			
		||||
            m_angleB += 0.1f * b2_pi;
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case 'e':
 | 
			
		||||
            m_angleB -= 0.1f * b2_pi;
 | 
			
		||||
            break;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        m_transformB.Set(m_positionB, m_angleB);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    b2Vec2 m_positionB;
 | 
			
		||||
    float32 m_angleB;
 | 
			
		||||
 | 
			
		||||
    b2Transform m_transformA;
 | 
			
		||||
    b2Transform m_transformB;
 | 
			
		||||
    b2PolygonShape m_polygonA;
 | 
			
		||||
    b2PolygonShape m_polygonB;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -1,215 +1,215 @@
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef DOMINOS_H
 | 
			
		||||
#define DOMINOS_H
 | 
			
		||||
 | 
			
		||||
class Dominos : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
 | 
			
		||||
    Dominos()
 | 
			
		||||
    {
 | 
			
		||||
        b2Body* b1;
 | 
			
		||||
        {
 | 
			
		||||
            b2EdgeShape shape;
 | 
			
		||||
            shape.Set(b2Vec2(-40.0f, 0.0f), b2Vec2(40.0f, 0.0f));
 | 
			
		||||
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            b1 = m_world->CreateBody(&bd);
 | 
			
		||||
            b1->CreateFixture(&shape, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(6.0f, 0.25f);
 | 
			
		||||
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.position.Set(-1.5f, 10.0f);
 | 
			
		||||
            b2Body* ground = m_world->CreateBody(&bd);
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(0.1f, 1.0f);
 | 
			
		||||
 | 
			
		||||
            b2FixtureDef fd;
 | 
			
		||||
            fd.shape = &shape;
 | 
			
		||||
            fd.density = 20.0f;
 | 
			
		||||
            fd.friction = 0.1f;
 | 
			
		||||
 | 
			
		||||
            for (int i = 0; i < 10; ++i)
 | 
			
		||||
            {
 | 
			
		||||
                b2BodyDef bd;
 | 
			
		||||
                bd.type = b2_dynamicBody;
 | 
			
		||||
                bd.position.Set(-6.0f + 1.0f * i, 11.25f);
 | 
			
		||||
                b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
                body->CreateFixture(&fd);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(7.0f, 0.25f, b2Vec2_zero, 0.3f);
 | 
			
		||||
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.position.Set(1.0f, 6.0f);
 | 
			
		||||
            b2Body* ground = m_world->CreateBody(&bd);
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        b2Body* b2;
 | 
			
		||||
        {
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(0.25f, 1.5f);
 | 
			
		||||
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.position.Set(-7.0f, 4.0f);
 | 
			
		||||
            b2 = m_world->CreateBody(&bd);
 | 
			
		||||
            b2->CreateFixture(&shape, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        b2Body* b3;
 | 
			
		||||
        {
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(6.0f, 0.125f);
 | 
			
		||||
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
            bd.position.Set(-0.9f, 1.0f);
 | 
			
		||||
            bd.angle = -0.15f;
 | 
			
		||||
 | 
			
		||||
            b3 = m_world->CreateBody(&bd);
 | 
			
		||||
            b3->CreateFixture(&shape, 10.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        b2RevoluteJointDef jd;
 | 
			
		||||
        b2Vec2 anchor;
 | 
			
		||||
 | 
			
		||||
        anchor.Set(-2.0f, 1.0f);
 | 
			
		||||
        jd.Initialize(b1, b3, anchor);
 | 
			
		||||
        jd.collideConnected = true;
 | 
			
		||||
        m_world->CreateJoint(&jd);
 | 
			
		||||
 | 
			
		||||
        b2Body* b4;
 | 
			
		||||
        {
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(0.25f, 0.25f);
 | 
			
		||||
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
            bd.position.Set(-10.0f, 15.0f);
 | 
			
		||||
            b4 = m_world->CreateBody(&bd);
 | 
			
		||||
            b4->CreateFixture(&shape, 10.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        anchor.Set(-7.0f, 15.0f);
 | 
			
		||||
        jd.Initialize(b2, b4, anchor);
 | 
			
		||||
        m_world->CreateJoint(&jd);
 | 
			
		||||
 | 
			
		||||
        b2Body* b5;
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
            bd.position.Set(6.5f, 3.0f);
 | 
			
		||||
            b5 = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            b2FixtureDef fd;
 | 
			
		||||
 | 
			
		||||
            fd.shape = &shape;
 | 
			
		||||
            fd.density = 10.0f;
 | 
			
		||||
            fd.friction = 0.1f;
 | 
			
		||||
 | 
			
		||||
            shape.SetAsBox(1.0f, 0.1f, b2Vec2(0.0f, -0.9f), 0.0f);
 | 
			
		||||
            b5->CreateFixture(&fd);
 | 
			
		||||
 | 
			
		||||
            shape.SetAsBox(0.1f, 1.0f, b2Vec2(-0.9f, 0.0f), 0.0f);
 | 
			
		||||
            b5->CreateFixture(&fd);
 | 
			
		||||
 | 
			
		||||
            shape.SetAsBox(0.1f, 1.0f, b2Vec2(0.9f, 0.0f), 0.0f);
 | 
			
		||||
            b5->CreateFixture(&fd);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        anchor.Set(6.0f, 2.0f);
 | 
			
		||||
        jd.Initialize(b1, b5, anchor);
 | 
			
		||||
        m_world->CreateJoint(&jd);
 | 
			
		||||
 | 
			
		||||
        b2Body* b6;
 | 
			
		||||
        {
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(1.0f, 0.1f);
 | 
			
		||||
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
            bd.position.Set(6.5f, 4.1f);
 | 
			
		||||
            b6 = m_world->CreateBody(&bd);
 | 
			
		||||
            b6->CreateFixture(&shape, 30.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        anchor.Set(7.5f, 4.0f);
 | 
			
		||||
        jd.Initialize(b5, b6, anchor);
 | 
			
		||||
        m_world->CreateJoint(&jd);
 | 
			
		||||
 | 
			
		||||
        b2Body* b7;
 | 
			
		||||
        {
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(0.1f, 1.0f);
 | 
			
		||||
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
            bd.position.Set(7.4f, 1.0f);
 | 
			
		||||
 | 
			
		||||
            b7 = m_world->CreateBody(&bd);
 | 
			
		||||
            b7->CreateFixture(&shape, 10.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        b2DistanceJointDef djd;
 | 
			
		||||
        djd.bodyA = b3;
 | 
			
		||||
        djd.bodyB = b7;
 | 
			
		||||
        djd.localAnchorA.Set(6.0f, 0.0f);
 | 
			
		||||
        djd.localAnchorB.Set(0.0f, -1.0f);
 | 
			
		||||
        b2Vec2 d = djd.bodyB->GetWorldPoint(djd.localAnchorB) - djd.bodyA->GetWorldPoint(djd.localAnchorA);
 | 
			
		||||
        djd.length = d.Length();
 | 
			
		||||
        m_world->CreateJoint(&djd);
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            float32 radius = 0.2f;
 | 
			
		||||
 | 
			
		||||
            b2CircleShape shape;
 | 
			
		||||
            shape.m_radius = radius;
 | 
			
		||||
 | 
			
		||||
            for (int i = 0; i < 4; ++i)
 | 
			
		||||
            {
 | 
			
		||||
                b2BodyDef bd;
 | 
			
		||||
                bd.type = b2_dynamicBody;
 | 
			
		||||
                bd.position.Set(5.9f + 2.0f * radius * i, 2.4f);
 | 
			
		||||
                b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
                body->CreateFixture(&shape, 10.0f);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new Dominos;
 | 
			
		||||
    }
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef DOMINOS_H
 | 
			
		||||
#define DOMINOS_H
 | 
			
		||||
 | 
			
		||||
class Dominos : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
 | 
			
		||||
    Dominos()
 | 
			
		||||
    {
 | 
			
		||||
        b2Body* b1;
 | 
			
		||||
        {
 | 
			
		||||
            b2EdgeShape shape;
 | 
			
		||||
            shape.Set(b2Vec2(-40.0f, 0.0f), b2Vec2(40.0f, 0.0f));
 | 
			
		||||
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            b1 = m_world->CreateBody(&bd);
 | 
			
		||||
            b1->CreateFixture(&shape, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(6.0f, 0.25f);
 | 
			
		||||
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.position.Set(-1.5f, 10.0f);
 | 
			
		||||
            b2Body* ground = m_world->CreateBody(&bd);
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(0.1f, 1.0f);
 | 
			
		||||
 | 
			
		||||
            b2FixtureDef fd;
 | 
			
		||||
            fd.shape = &shape;
 | 
			
		||||
            fd.density = 20.0f;
 | 
			
		||||
            fd.friction = 0.1f;
 | 
			
		||||
 | 
			
		||||
            for (int i = 0; i < 10; ++i)
 | 
			
		||||
            {
 | 
			
		||||
                b2BodyDef bd;
 | 
			
		||||
                bd.type = b2_dynamicBody;
 | 
			
		||||
                bd.position.Set(-6.0f + 1.0f * i, 11.25f);
 | 
			
		||||
                b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
                body->CreateFixture(&fd);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(7.0f, 0.25f, b2Vec2_zero, 0.3f);
 | 
			
		||||
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.position.Set(1.0f, 6.0f);
 | 
			
		||||
            b2Body* ground = m_world->CreateBody(&bd);
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        b2Body* b2;
 | 
			
		||||
        {
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(0.25f, 1.5f);
 | 
			
		||||
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.position.Set(-7.0f, 4.0f);
 | 
			
		||||
            b2 = m_world->CreateBody(&bd);
 | 
			
		||||
            b2->CreateFixture(&shape, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        b2Body* b3;
 | 
			
		||||
        {
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(6.0f, 0.125f);
 | 
			
		||||
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
            bd.position.Set(-0.9f, 1.0f);
 | 
			
		||||
            bd.angle = -0.15f;
 | 
			
		||||
 | 
			
		||||
            b3 = m_world->CreateBody(&bd);
 | 
			
		||||
            b3->CreateFixture(&shape, 10.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        b2RevoluteJointDef jd;
 | 
			
		||||
        b2Vec2 anchor;
 | 
			
		||||
 | 
			
		||||
        anchor.Set(-2.0f, 1.0f);
 | 
			
		||||
        jd.Initialize(b1, b3, anchor);
 | 
			
		||||
        jd.collideConnected = true;
 | 
			
		||||
        m_world->CreateJoint(&jd);
 | 
			
		||||
 | 
			
		||||
        b2Body* b4;
 | 
			
		||||
        {
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(0.25f, 0.25f);
 | 
			
		||||
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
            bd.position.Set(-10.0f, 15.0f);
 | 
			
		||||
            b4 = m_world->CreateBody(&bd);
 | 
			
		||||
            b4->CreateFixture(&shape, 10.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        anchor.Set(-7.0f, 15.0f);
 | 
			
		||||
        jd.Initialize(b2, b4, anchor);
 | 
			
		||||
        m_world->CreateJoint(&jd);
 | 
			
		||||
 | 
			
		||||
        b2Body* b5;
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
            bd.position.Set(6.5f, 3.0f);
 | 
			
		||||
            b5 = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            b2FixtureDef fd;
 | 
			
		||||
 | 
			
		||||
            fd.shape = &shape;
 | 
			
		||||
            fd.density = 10.0f;
 | 
			
		||||
            fd.friction = 0.1f;
 | 
			
		||||
 | 
			
		||||
            shape.SetAsBox(1.0f, 0.1f, b2Vec2(0.0f, -0.9f), 0.0f);
 | 
			
		||||
            b5->CreateFixture(&fd);
 | 
			
		||||
 | 
			
		||||
            shape.SetAsBox(0.1f, 1.0f, b2Vec2(-0.9f, 0.0f), 0.0f);
 | 
			
		||||
            b5->CreateFixture(&fd);
 | 
			
		||||
 | 
			
		||||
            shape.SetAsBox(0.1f, 1.0f, b2Vec2(0.9f, 0.0f), 0.0f);
 | 
			
		||||
            b5->CreateFixture(&fd);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        anchor.Set(6.0f, 2.0f);
 | 
			
		||||
        jd.Initialize(b1, b5, anchor);
 | 
			
		||||
        m_world->CreateJoint(&jd);
 | 
			
		||||
 | 
			
		||||
        b2Body* b6;
 | 
			
		||||
        {
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(1.0f, 0.1f);
 | 
			
		||||
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
            bd.position.Set(6.5f, 4.1f);
 | 
			
		||||
            b6 = m_world->CreateBody(&bd);
 | 
			
		||||
            b6->CreateFixture(&shape, 30.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        anchor.Set(7.5f, 4.0f);
 | 
			
		||||
        jd.Initialize(b5, b6, anchor);
 | 
			
		||||
        m_world->CreateJoint(&jd);
 | 
			
		||||
 | 
			
		||||
        b2Body* b7;
 | 
			
		||||
        {
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(0.1f, 1.0f);
 | 
			
		||||
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
            bd.position.Set(7.4f, 1.0f);
 | 
			
		||||
 | 
			
		||||
            b7 = m_world->CreateBody(&bd);
 | 
			
		||||
            b7->CreateFixture(&shape, 10.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        b2DistanceJointDef djd;
 | 
			
		||||
        djd.bodyA = b3;
 | 
			
		||||
        djd.bodyB = b7;
 | 
			
		||||
        djd.localAnchorA.Set(6.0f, 0.0f);
 | 
			
		||||
        djd.localAnchorB.Set(0.0f, -1.0f);
 | 
			
		||||
        b2Vec2 d = djd.bodyB->GetWorldPoint(djd.localAnchorB) - djd.bodyA->GetWorldPoint(djd.localAnchorA);
 | 
			
		||||
        djd.length = d.Length();
 | 
			
		||||
        m_world->CreateJoint(&djd);
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            float32 radius = 0.2f;
 | 
			
		||||
 | 
			
		||||
            b2CircleShape shape;
 | 
			
		||||
            shape.m_radius = radius;
 | 
			
		||||
 | 
			
		||||
            for (int i = 0; i < 4; ++i)
 | 
			
		||||
            {
 | 
			
		||||
                b2BodyDef bd;
 | 
			
		||||
                bd.type = b2_dynamicBody;
 | 
			
		||||
                bd.position.Set(5.9f + 2.0f * radius * i, 2.4f);
 | 
			
		||||
                b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
                body->CreateFixture(&shape, 10.0f);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new Dominos;
 | 
			
		||||
    }
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -1,267 +1,267 @@
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2011 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef DUMP_SHELL_H
 | 
			
		||||
#define DUMP_SHELL_H
 | 
			
		||||
 | 
			
		||||
// This test holds worlds dumped using b2World::Dump.
 | 
			
		||||
class DumpShell : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
 | 
			
		||||
    DumpShell()
 | 
			
		||||
    {
 | 
			
		||||
 | 
			
		||||
b2Vec2 g(0.000000000000000e+00f, 0.000000000000000e+00f);
 | 
			
		||||
m_world->SetGravity(g);
 | 
			
		||||
b2Body** bodies = (b2Body**)b2Alloc(3 * sizeof(b2Body*));
 | 
			
		||||
b2Joint** joints = (b2Joint**)b2Alloc(2 * sizeof(b2Joint*));
 | 
			
		||||
{
 | 
			
		||||
  b2BodyDef bd;
 | 
			
		||||
  bd.type = b2BodyType(2);
 | 
			
		||||
  bd.position.Set(1.304347801208496e+01f, 2.500000000000000e+00f);
 | 
			
		||||
  bd.angle = 0.000000000000000e+00f;
 | 
			
		||||
  bd.linearVelocity.Set(0.000000000000000e+00f, 0.000000000000000e+00f);
 | 
			
		||||
  bd.angularVelocity = 0.000000000000000e+00f;
 | 
			
		||||
  bd.linearDamping = 5.000000000000000e-01f;
 | 
			
		||||
  bd.angularDamping = 5.000000000000000e-01f;
 | 
			
		||||
  bd.allowSleep = bool(4);
 | 
			
		||||
  bd.awake = bool(2);
 | 
			
		||||
  bd.fixedRotation = bool(0);
 | 
			
		||||
  bd.bullet = bool(0);
 | 
			
		||||
  bd.active = bool(32);
 | 
			
		||||
  bd.gravityScale = 1.000000000000000e+00f;
 | 
			
		||||
  bodies[0] = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
  {
 | 
			
		||||
    b2FixtureDef fd;
 | 
			
		||||
    fd.friction = 1.000000000000000e+00f;
 | 
			
		||||
    fd.restitution = 5.000000000000000e-01f;
 | 
			
		||||
    fd.density = 1.000000000000000e+01f;
 | 
			
		||||
    fd.isSensor = bool(0);
 | 
			
		||||
    fd.filter.categoryBits = uint16(1);
 | 
			
		||||
    fd.filter.maskBits = uint16(65535);
 | 
			
		||||
    fd.filter.groupIndex = int16(0);
 | 
			
		||||
    b2PolygonShape shape;
 | 
			
		||||
    b2Vec2 vs[8];
 | 
			
		||||
    vs[0].Set(-6.900000095367432e+00f, -3.000000119209290e-01f);
 | 
			
		||||
    vs[1].Set(2.000000029802322e-01f, -3.000000119209290e-01f);
 | 
			
		||||
    vs[2].Set(2.000000029802322e-01f, 2.000000029802322e-01f);
 | 
			
		||||
    vs[3].Set(-6.900000095367432e+00f, 2.000000029802322e-01f);
 | 
			
		||||
    shape.Set(vs, 4);
 | 
			
		||||
 | 
			
		||||
    fd.shape = &shape;
 | 
			
		||||
 | 
			
		||||
    bodies[0]->CreateFixture(&fd);
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
{
 | 
			
		||||
  b2BodyDef bd;
 | 
			
		||||
  bd.type = b2BodyType(2);
 | 
			
		||||
  bd.position.Set(8.478260636329651e-01f, 2.500000000000000e+00f);
 | 
			
		||||
  bd.angle = 0.000000000000000e+00f;
 | 
			
		||||
  bd.linearVelocity.Set(0.000000000000000e+00f, 0.000000000000000e+00f);
 | 
			
		||||
  bd.angularVelocity = 0.000000000000000e+00f;
 | 
			
		||||
  bd.linearDamping = 5.000000000000000e-01f;
 | 
			
		||||
  bd.angularDamping = 5.000000000000000e-01f;
 | 
			
		||||
  bd.allowSleep = bool(4);
 | 
			
		||||
  bd.awake = bool(2);
 | 
			
		||||
  bd.fixedRotation = bool(0);
 | 
			
		||||
  bd.bullet = bool(0);
 | 
			
		||||
  bd.active = bool(32);
 | 
			
		||||
  bd.gravityScale = 1.000000000000000e+00f;
 | 
			
		||||
  bodies[1] = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
  {
 | 
			
		||||
    b2FixtureDef fd;
 | 
			
		||||
    fd.friction = 1.000000000000000e+00f;
 | 
			
		||||
    fd.restitution = 5.000000000000000e-01f;
 | 
			
		||||
    fd.density = 1.000000000000000e+01f;
 | 
			
		||||
    fd.isSensor = bool(0);
 | 
			
		||||
    fd.filter.categoryBits = uint16(1);
 | 
			
		||||
    fd.filter.maskBits = uint16(65535);
 | 
			
		||||
    fd.filter.groupIndex = int16(0);
 | 
			
		||||
    b2PolygonShape shape;
 | 
			
		||||
    b2Vec2 vs[8];
 | 
			
		||||
    vs[0].Set(-3.228000104427338e-01f, -2.957000136375427e-01f);
 | 
			
		||||
    vs[1].Set(6.885900020599365e+00f, -3.641000092029572e-01f);
 | 
			
		||||
    vs[2].Set(6.907599925994873e+00f, 3.271999955177307e-01f);
 | 
			
		||||
    vs[3].Set(-3.228000104427338e-01f, 2.825999855995178e-01f);
 | 
			
		||||
    shape.Set(vs, 4);
 | 
			
		||||
 | 
			
		||||
    fd.shape = &shape;
 | 
			
		||||
 | 
			
		||||
    bodies[1]->CreateFixture(&fd);
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
{
 | 
			
		||||
  b2BodyDef bd;
 | 
			
		||||
  bd.type = b2BodyType(0);
 | 
			
		||||
  bd.position.Set(0.000000000000000e+00f, 0.000000000000000e+00f);
 | 
			
		||||
  bd.angle = 0.000000000000000e+00f;
 | 
			
		||||
  bd.linearVelocity.Set(0.000000000000000e+00f, 0.000000000000000e+00f);
 | 
			
		||||
  bd.angularVelocity = 0.000000000000000e+00f;
 | 
			
		||||
  bd.linearDamping = 0.000000000000000e+00f;
 | 
			
		||||
  bd.angularDamping = 0.000000000000000e+00f;
 | 
			
		||||
  bd.allowSleep = bool(4);
 | 
			
		||||
  bd.awake = bool(2);
 | 
			
		||||
  bd.fixedRotation = bool(0);
 | 
			
		||||
  bd.bullet = bool(0);
 | 
			
		||||
  bd.active = bool(32);
 | 
			
		||||
  bd.gravityScale = 1.000000000000000e+00f;
 | 
			
		||||
  bodies[2] = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
  {
 | 
			
		||||
    b2FixtureDef fd;
 | 
			
		||||
    fd.friction = 1.000000000000000e+01f;
 | 
			
		||||
    fd.restitution = 0.000000000000000e+00f;
 | 
			
		||||
    fd.density = 0.000000000000000e+00f;
 | 
			
		||||
    fd.isSensor = bool(0);
 | 
			
		||||
    fd.filter.categoryBits = uint16(1);
 | 
			
		||||
    fd.filter.maskBits = uint16(65535);
 | 
			
		||||
    fd.filter.groupIndex = int16(0);
 | 
			
		||||
    b2EdgeShape shape;
 | 
			
		||||
    shape.m_radius = 9.999999776482582e-03f;
 | 
			
		||||
    shape.m_vertex0.Set(0.000000000000000e+00f, 0.000000000000000e+00f);
 | 
			
		||||
    shape.m_vertex1.Set(4.452173995971680e+01f, 1.669565200805664e+01f);
 | 
			
		||||
    shape.m_vertex2.Set(4.452173995971680e+01f, 0.000000000000000e+00f);
 | 
			
		||||
    shape.m_vertex3.Set(0.000000000000000e+00f, 0.000000000000000e+00f);
 | 
			
		||||
    shape.m_hasVertex0 = bool(0);
 | 
			
		||||
    shape.m_hasVertex3 = bool(0);
 | 
			
		||||
 | 
			
		||||
    fd.shape = &shape;
 | 
			
		||||
 | 
			
		||||
    bodies[2]->CreateFixture(&fd);
 | 
			
		||||
  }
 | 
			
		||||
  {
 | 
			
		||||
    b2FixtureDef fd;
 | 
			
		||||
    fd.friction = 1.000000000000000e+01f;
 | 
			
		||||
    fd.restitution = 0.000000000000000e+00f;
 | 
			
		||||
    fd.density = 0.000000000000000e+00f;
 | 
			
		||||
    fd.isSensor = bool(0);
 | 
			
		||||
    fd.filter.categoryBits = uint16(1);
 | 
			
		||||
    fd.filter.maskBits = uint16(65535);
 | 
			
		||||
    fd.filter.groupIndex = int16(0);
 | 
			
		||||
    b2EdgeShape shape;
 | 
			
		||||
    shape.m_radius = 9.999999776482582e-03f;
 | 
			
		||||
    shape.m_vertex0.Set(0.000000000000000e+00f, 0.000000000000000e+00f);
 | 
			
		||||
    shape.m_vertex1.Set(0.000000000000000e+00f, 1.669565200805664e+01f);
 | 
			
		||||
    shape.m_vertex2.Set(0.000000000000000e+00f, 0.000000000000000e+00f);
 | 
			
		||||
    shape.m_vertex3.Set(0.000000000000000e+00f, 0.000000000000000e+00f);
 | 
			
		||||
    shape.m_hasVertex0 = bool(0);
 | 
			
		||||
    shape.m_hasVertex3 = bool(0);
 | 
			
		||||
 | 
			
		||||
    fd.shape = &shape;
 | 
			
		||||
 | 
			
		||||
    bodies[2]->CreateFixture(&fd);
 | 
			
		||||
  }
 | 
			
		||||
  {
 | 
			
		||||
    b2FixtureDef fd;
 | 
			
		||||
    fd.friction = 1.000000000000000e+01f;
 | 
			
		||||
    fd.restitution = 0.000000000000000e+00f;
 | 
			
		||||
    fd.density = 0.000000000000000e+00f;
 | 
			
		||||
    fd.isSensor = bool(0);
 | 
			
		||||
    fd.filter.categoryBits = uint16(1);
 | 
			
		||||
    fd.filter.maskBits = uint16(65535);
 | 
			
		||||
    fd.filter.groupIndex = int16(0);
 | 
			
		||||
    b2EdgeShape shape;
 | 
			
		||||
    shape.m_radius = 9.999999776482582e-03f;
 | 
			
		||||
    shape.m_vertex0.Set(0.000000000000000e+00f, 0.000000000000000e+00f);
 | 
			
		||||
    shape.m_vertex1.Set(0.000000000000000e+00f, 1.669565200805664e+01f);
 | 
			
		||||
    shape.m_vertex2.Set(4.452173995971680e+01f, 1.669565200805664e+01f);
 | 
			
		||||
    shape.m_vertex3.Set(0.000000000000000e+00f, 0.000000000000000e+00f);
 | 
			
		||||
    shape.m_hasVertex0 = bool(0);
 | 
			
		||||
    shape.m_hasVertex3 = bool(0);
 | 
			
		||||
 | 
			
		||||
    fd.shape = &shape;
 | 
			
		||||
 | 
			
		||||
    bodies[2]->CreateFixture(&fd);
 | 
			
		||||
  }
 | 
			
		||||
  {
 | 
			
		||||
    b2FixtureDef fd;
 | 
			
		||||
    fd.friction = 1.000000000000000e+01f;
 | 
			
		||||
    fd.restitution = 0.000000000000000e+00f;
 | 
			
		||||
    fd.density = 0.000000000000000e+00f;
 | 
			
		||||
    fd.isSensor = bool(0);
 | 
			
		||||
    fd.filter.categoryBits = uint16(1);
 | 
			
		||||
    fd.filter.maskBits = uint16(65535);
 | 
			
		||||
    fd.filter.groupIndex = int16(0);
 | 
			
		||||
    b2EdgeShape shape;
 | 
			
		||||
    shape.m_radius = 9.999999776482582e-03f;
 | 
			
		||||
    shape.m_vertex0.Set(0.000000000000000e+00f, 0.000000000000000e+00f);
 | 
			
		||||
    shape.m_vertex1.Set(0.000000000000000e+00f, 0.000000000000000e+00f);
 | 
			
		||||
    shape.m_vertex2.Set(4.452173995971680e+01f, 0.000000000000000e+00f);
 | 
			
		||||
    shape.m_vertex3.Set(0.000000000000000e+00f, 0.000000000000000e+00f);
 | 
			
		||||
    shape.m_hasVertex0 = bool(0);
 | 
			
		||||
    shape.m_hasVertex3 = bool(0);
 | 
			
		||||
 | 
			
		||||
    fd.shape = &shape;
 | 
			
		||||
 | 
			
		||||
    bodies[2]->CreateFixture(&fd);
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
{
 | 
			
		||||
  b2PrismaticJointDef jd;
 | 
			
		||||
  jd.bodyA = bodies[1];
 | 
			
		||||
  jd.bodyB = bodies[0];
 | 
			
		||||
  jd.collideConnected = bool(0);
 | 
			
		||||
  jd.localAnchorA.Set(0.000000000000000e+00f, 0.000000000000000e+00f);
 | 
			
		||||
  jd.localAnchorB.Set(-1.219565200805664e+01f, 0.000000000000000e+00f);
 | 
			
		||||
  jd.localAxisA.Set(-1.219565200805664e+01f, 0.000000000000000e+00f);
 | 
			
		||||
  jd.referenceAngle = 0.000000000000000e+00f;
 | 
			
		||||
  jd.enableLimit = bool(1);
 | 
			
		||||
  jd.lowerTranslation = -2.000000000000000e+01f;
 | 
			
		||||
  jd.upperTranslation = 0.000000000000000e+00f;
 | 
			
		||||
  jd.enableMotor = bool(1);
 | 
			
		||||
  jd.motorSpeed = 0.000000000000000e+00f;
 | 
			
		||||
  jd.maxMotorForce = 1.000000000000000e+01f;
 | 
			
		||||
  joints[0] = m_world->CreateJoint(&jd);
 | 
			
		||||
}
 | 
			
		||||
{
 | 
			
		||||
  b2RevoluteJointDef jd;
 | 
			
		||||
  jd.bodyA = bodies[1];
 | 
			
		||||
  jd.bodyB = bodies[2];
 | 
			
		||||
  jd.collideConnected = bool(0);
 | 
			
		||||
  jd.localAnchorA.Set(0.000000000000000e+00f, 0.000000000000000e+00f);
 | 
			
		||||
  jd.localAnchorB.Set(8.478260636329651e-01f, 2.500000000000000e+00f);
 | 
			
		||||
  jd.referenceAngle = 0.000000000000000e+00f;
 | 
			
		||||
  jd.enableLimit = bool(0);
 | 
			
		||||
  jd.lowerAngle = 0.000000000000000e+00f;
 | 
			
		||||
  jd.upperAngle = 0.000000000000000e+00f;
 | 
			
		||||
  jd.enableMotor = bool(0);
 | 
			
		||||
  jd.motorSpeed = 0.000000000000000e+00f;
 | 
			
		||||
  jd.maxMotorTorque = 0.000000000000000e+00f;
 | 
			
		||||
  joints[1] = m_world->CreateJoint(&jd);
 | 
			
		||||
}
 | 
			
		||||
b2Free(joints);
 | 
			
		||||
b2Free(bodies);
 | 
			
		||||
joints = NULL;
 | 
			
		||||
bodies = NULL;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new DumpShell;
 | 
			
		||||
    }
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2011 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef DUMP_SHELL_H
 | 
			
		||||
#define DUMP_SHELL_H
 | 
			
		||||
 | 
			
		||||
// This test holds worlds dumped using b2World::Dump.
 | 
			
		||||
class DumpShell : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
 | 
			
		||||
    DumpShell()
 | 
			
		||||
    {
 | 
			
		||||
 | 
			
		||||
b2Vec2 g(0.000000000000000e+00f, 0.000000000000000e+00f);
 | 
			
		||||
m_world->SetGravity(g);
 | 
			
		||||
b2Body** bodies = (b2Body**)b2Alloc(3 * sizeof(b2Body*));
 | 
			
		||||
b2Joint** joints = (b2Joint**)b2Alloc(2 * sizeof(b2Joint*));
 | 
			
		||||
{
 | 
			
		||||
  b2BodyDef bd;
 | 
			
		||||
  bd.type = b2BodyType(2);
 | 
			
		||||
  bd.position.Set(1.304347801208496e+01f, 2.500000000000000e+00f);
 | 
			
		||||
  bd.angle = 0.000000000000000e+00f;
 | 
			
		||||
  bd.linearVelocity.Set(0.000000000000000e+00f, 0.000000000000000e+00f);
 | 
			
		||||
  bd.angularVelocity = 0.000000000000000e+00f;
 | 
			
		||||
  bd.linearDamping = 5.000000000000000e-01f;
 | 
			
		||||
  bd.angularDamping = 5.000000000000000e-01f;
 | 
			
		||||
  bd.allowSleep = bool(4);
 | 
			
		||||
  bd.awake = bool(2);
 | 
			
		||||
  bd.fixedRotation = bool(0);
 | 
			
		||||
  bd.bullet = bool(0);
 | 
			
		||||
  bd.active = bool(32);
 | 
			
		||||
  bd.gravityScale = 1.000000000000000e+00f;
 | 
			
		||||
  bodies[0] = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
  {
 | 
			
		||||
    b2FixtureDef fd;
 | 
			
		||||
    fd.friction = 1.000000000000000e+00f;
 | 
			
		||||
    fd.restitution = 5.000000000000000e-01f;
 | 
			
		||||
    fd.density = 1.000000000000000e+01f;
 | 
			
		||||
    fd.isSensor = bool(0);
 | 
			
		||||
    fd.filter.categoryBits = uint16(1);
 | 
			
		||||
    fd.filter.maskBits = uint16(65535);
 | 
			
		||||
    fd.filter.groupIndex = int16(0);
 | 
			
		||||
    b2PolygonShape shape;
 | 
			
		||||
    b2Vec2 vs[8];
 | 
			
		||||
    vs[0].Set(-6.900000095367432e+00f, -3.000000119209290e-01f);
 | 
			
		||||
    vs[1].Set(2.000000029802322e-01f, -3.000000119209290e-01f);
 | 
			
		||||
    vs[2].Set(2.000000029802322e-01f, 2.000000029802322e-01f);
 | 
			
		||||
    vs[3].Set(-6.900000095367432e+00f, 2.000000029802322e-01f);
 | 
			
		||||
    shape.Set(vs, 4);
 | 
			
		||||
 | 
			
		||||
    fd.shape = &shape;
 | 
			
		||||
 | 
			
		||||
    bodies[0]->CreateFixture(&fd);
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
{
 | 
			
		||||
  b2BodyDef bd;
 | 
			
		||||
  bd.type = b2BodyType(2);
 | 
			
		||||
  bd.position.Set(8.478260636329651e-01f, 2.500000000000000e+00f);
 | 
			
		||||
  bd.angle = 0.000000000000000e+00f;
 | 
			
		||||
  bd.linearVelocity.Set(0.000000000000000e+00f, 0.000000000000000e+00f);
 | 
			
		||||
  bd.angularVelocity = 0.000000000000000e+00f;
 | 
			
		||||
  bd.linearDamping = 5.000000000000000e-01f;
 | 
			
		||||
  bd.angularDamping = 5.000000000000000e-01f;
 | 
			
		||||
  bd.allowSleep = bool(4);
 | 
			
		||||
  bd.awake = bool(2);
 | 
			
		||||
  bd.fixedRotation = bool(0);
 | 
			
		||||
  bd.bullet = bool(0);
 | 
			
		||||
  bd.active = bool(32);
 | 
			
		||||
  bd.gravityScale = 1.000000000000000e+00f;
 | 
			
		||||
  bodies[1] = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
  {
 | 
			
		||||
    b2FixtureDef fd;
 | 
			
		||||
    fd.friction = 1.000000000000000e+00f;
 | 
			
		||||
    fd.restitution = 5.000000000000000e-01f;
 | 
			
		||||
    fd.density = 1.000000000000000e+01f;
 | 
			
		||||
    fd.isSensor = bool(0);
 | 
			
		||||
    fd.filter.categoryBits = uint16(1);
 | 
			
		||||
    fd.filter.maskBits = uint16(65535);
 | 
			
		||||
    fd.filter.groupIndex = int16(0);
 | 
			
		||||
    b2PolygonShape shape;
 | 
			
		||||
    b2Vec2 vs[8];
 | 
			
		||||
    vs[0].Set(-3.228000104427338e-01f, -2.957000136375427e-01f);
 | 
			
		||||
    vs[1].Set(6.885900020599365e+00f, -3.641000092029572e-01f);
 | 
			
		||||
    vs[2].Set(6.907599925994873e+00f, 3.271999955177307e-01f);
 | 
			
		||||
    vs[3].Set(-3.228000104427338e-01f, 2.825999855995178e-01f);
 | 
			
		||||
    shape.Set(vs, 4);
 | 
			
		||||
 | 
			
		||||
    fd.shape = &shape;
 | 
			
		||||
 | 
			
		||||
    bodies[1]->CreateFixture(&fd);
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
{
 | 
			
		||||
  b2BodyDef bd;
 | 
			
		||||
  bd.type = b2BodyType(0);
 | 
			
		||||
  bd.position.Set(0.000000000000000e+00f, 0.000000000000000e+00f);
 | 
			
		||||
  bd.angle = 0.000000000000000e+00f;
 | 
			
		||||
  bd.linearVelocity.Set(0.000000000000000e+00f, 0.000000000000000e+00f);
 | 
			
		||||
  bd.angularVelocity = 0.000000000000000e+00f;
 | 
			
		||||
  bd.linearDamping = 0.000000000000000e+00f;
 | 
			
		||||
  bd.angularDamping = 0.000000000000000e+00f;
 | 
			
		||||
  bd.allowSleep = bool(4);
 | 
			
		||||
  bd.awake = bool(2);
 | 
			
		||||
  bd.fixedRotation = bool(0);
 | 
			
		||||
  bd.bullet = bool(0);
 | 
			
		||||
  bd.active = bool(32);
 | 
			
		||||
  bd.gravityScale = 1.000000000000000e+00f;
 | 
			
		||||
  bodies[2] = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
  {
 | 
			
		||||
    b2FixtureDef fd;
 | 
			
		||||
    fd.friction = 1.000000000000000e+01f;
 | 
			
		||||
    fd.restitution = 0.000000000000000e+00f;
 | 
			
		||||
    fd.density = 0.000000000000000e+00f;
 | 
			
		||||
    fd.isSensor = bool(0);
 | 
			
		||||
    fd.filter.categoryBits = uint16(1);
 | 
			
		||||
    fd.filter.maskBits = uint16(65535);
 | 
			
		||||
    fd.filter.groupIndex = int16(0);
 | 
			
		||||
    b2EdgeShape shape;
 | 
			
		||||
    shape.m_radius = 9.999999776482582e-03f;
 | 
			
		||||
    shape.m_vertex0.Set(0.000000000000000e+00f, 0.000000000000000e+00f);
 | 
			
		||||
    shape.m_vertex1.Set(4.452173995971680e+01f, 1.669565200805664e+01f);
 | 
			
		||||
    shape.m_vertex2.Set(4.452173995971680e+01f, 0.000000000000000e+00f);
 | 
			
		||||
    shape.m_vertex3.Set(0.000000000000000e+00f, 0.000000000000000e+00f);
 | 
			
		||||
    shape.m_hasVertex0 = bool(0);
 | 
			
		||||
    shape.m_hasVertex3 = bool(0);
 | 
			
		||||
 | 
			
		||||
    fd.shape = &shape;
 | 
			
		||||
 | 
			
		||||
    bodies[2]->CreateFixture(&fd);
 | 
			
		||||
  }
 | 
			
		||||
  {
 | 
			
		||||
    b2FixtureDef fd;
 | 
			
		||||
    fd.friction = 1.000000000000000e+01f;
 | 
			
		||||
    fd.restitution = 0.000000000000000e+00f;
 | 
			
		||||
    fd.density = 0.000000000000000e+00f;
 | 
			
		||||
    fd.isSensor = bool(0);
 | 
			
		||||
    fd.filter.categoryBits = uint16(1);
 | 
			
		||||
    fd.filter.maskBits = uint16(65535);
 | 
			
		||||
    fd.filter.groupIndex = int16(0);
 | 
			
		||||
    b2EdgeShape shape;
 | 
			
		||||
    shape.m_radius = 9.999999776482582e-03f;
 | 
			
		||||
    shape.m_vertex0.Set(0.000000000000000e+00f, 0.000000000000000e+00f);
 | 
			
		||||
    shape.m_vertex1.Set(0.000000000000000e+00f, 1.669565200805664e+01f);
 | 
			
		||||
    shape.m_vertex2.Set(0.000000000000000e+00f, 0.000000000000000e+00f);
 | 
			
		||||
    shape.m_vertex3.Set(0.000000000000000e+00f, 0.000000000000000e+00f);
 | 
			
		||||
    shape.m_hasVertex0 = bool(0);
 | 
			
		||||
    shape.m_hasVertex3 = bool(0);
 | 
			
		||||
 | 
			
		||||
    fd.shape = &shape;
 | 
			
		||||
 | 
			
		||||
    bodies[2]->CreateFixture(&fd);
 | 
			
		||||
  }
 | 
			
		||||
  {
 | 
			
		||||
    b2FixtureDef fd;
 | 
			
		||||
    fd.friction = 1.000000000000000e+01f;
 | 
			
		||||
    fd.restitution = 0.000000000000000e+00f;
 | 
			
		||||
    fd.density = 0.000000000000000e+00f;
 | 
			
		||||
    fd.isSensor = bool(0);
 | 
			
		||||
    fd.filter.categoryBits = uint16(1);
 | 
			
		||||
    fd.filter.maskBits = uint16(65535);
 | 
			
		||||
    fd.filter.groupIndex = int16(0);
 | 
			
		||||
    b2EdgeShape shape;
 | 
			
		||||
    shape.m_radius = 9.999999776482582e-03f;
 | 
			
		||||
    shape.m_vertex0.Set(0.000000000000000e+00f, 0.000000000000000e+00f);
 | 
			
		||||
    shape.m_vertex1.Set(0.000000000000000e+00f, 1.669565200805664e+01f);
 | 
			
		||||
    shape.m_vertex2.Set(4.452173995971680e+01f, 1.669565200805664e+01f);
 | 
			
		||||
    shape.m_vertex3.Set(0.000000000000000e+00f, 0.000000000000000e+00f);
 | 
			
		||||
    shape.m_hasVertex0 = bool(0);
 | 
			
		||||
    shape.m_hasVertex3 = bool(0);
 | 
			
		||||
 | 
			
		||||
    fd.shape = &shape;
 | 
			
		||||
 | 
			
		||||
    bodies[2]->CreateFixture(&fd);
 | 
			
		||||
  }
 | 
			
		||||
  {
 | 
			
		||||
    b2FixtureDef fd;
 | 
			
		||||
    fd.friction = 1.000000000000000e+01f;
 | 
			
		||||
    fd.restitution = 0.000000000000000e+00f;
 | 
			
		||||
    fd.density = 0.000000000000000e+00f;
 | 
			
		||||
    fd.isSensor = bool(0);
 | 
			
		||||
    fd.filter.categoryBits = uint16(1);
 | 
			
		||||
    fd.filter.maskBits = uint16(65535);
 | 
			
		||||
    fd.filter.groupIndex = int16(0);
 | 
			
		||||
    b2EdgeShape shape;
 | 
			
		||||
    shape.m_radius = 9.999999776482582e-03f;
 | 
			
		||||
    shape.m_vertex0.Set(0.000000000000000e+00f, 0.000000000000000e+00f);
 | 
			
		||||
    shape.m_vertex1.Set(0.000000000000000e+00f, 0.000000000000000e+00f);
 | 
			
		||||
    shape.m_vertex2.Set(4.452173995971680e+01f, 0.000000000000000e+00f);
 | 
			
		||||
    shape.m_vertex3.Set(0.000000000000000e+00f, 0.000000000000000e+00f);
 | 
			
		||||
    shape.m_hasVertex0 = bool(0);
 | 
			
		||||
    shape.m_hasVertex3 = bool(0);
 | 
			
		||||
 | 
			
		||||
    fd.shape = &shape;
 | 
			
		||||
 | 
			
		||||
    bodies[2]->CreateFixture(&fd);
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
{
 | 
			
		||||
  b2PrismaticJointDef jd;
 | 
			
		||||
  jd.bodyA = bodies[1];
 | 
			
		||||
  jd.bodyB = bodies[0];
 | 
			
		||||
  jd.collideConnected = bool(0);
 | 
			
		||||
  jd.localAnchorA.Set(0.000000000000000e+00f, 0.000000000000000e+00f);
 | 
			
		||||
  jd.localAnchorB.Set(-1.219565200805664e+01f, 0.000000000000000e+00f);
 | 
			
		||||
  jd.localAxisA.Set(-1.219565200805664e+01f, 0.000000000000000e+00f);
 | 
			
		||||
  jd.referenceAngle = 0.000000000000000e+00f;
 | 
			
		||||
  jd.enableLimit = bool(1);
 | 
			
		||||
  jd.lowerTranslation = -2.000000000000000e+01f;
 | 
			
		||||
  jd.upperTranslation = 0.000000000000000e+00f;
 | 
			
		||||
  jd.enableMotor = bool(1);
 | 
			
		||||
  jd.motorSpeed = 0.000000000000000e+00f;
 | 
			
		||||
  jd.maxMotorForce = 1.000000000000000e+01f;
 | 
			
		||||
  joints[0] = m_world->CreateJoint(&jd);
 | 
			
		||||
}
 | 
			
		||||
{
 | 
			
		||||
  b2RevoluteJointDef jd;
 | 
			
		||||
  jd.bodyA = bodies[1];
 | 
			
		||||
  jd.bodyB = bodies[2];
 | 
			
		||||
  jd.collideConnected = bool(0);
 | 
			
		||||
  jd.localAnchorA.Set(0.000000000000000e+00f, 0.000000000000000e+00f);
 | 
			
		||||
  jd.localAnchorB.Set(8.478260636329651e-01f, 2.500000000000000e+00f);
 | 
			
		||||
  jd.referenceAngle = 0.000000000000000e+00f;
 | 
			
		||||
  jd.enableLimit = bool(0);
 | 
			
		||||
  jd.lowerAngle = 0.000000000000000e+00f;
 | 
			
		||||
  jd.upperAngle = 0.000000000000000e+00f;
 | 
			
		||||
  jd.enableMotor = bool(0);
 | 
			
		||||
  jd.motorSpeed = 0.000000000000000e+00f;
 | 
			
		||||
  jd.maxMotorTorque = 0.000000000000000e+00f;
 | 
			
		||||
  joints[1] = m_world->CreateJoint(&jd);
 | 
			
		||||
}
 | 
			
		||||
b2Free(joints);
 | 
			
		||||
b2Free(bodies);
 | 
			
		||||
joints = NULL;
 | 
			
		||||
bodies = NULL;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new DumpShell;
 | 
			
		||||
    }
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -1,357 +1,357 @@
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2009 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef DYNAMIC_TREE_TEST_H
 | 
			
		||||
#define DYNAMIC_TREE_TEST_H
 | 
			
		||||
 | 
			
		||||
class DynamicTreeTest : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
 | 
			
		||||
    enum
 | 
			
		||||
    {
 | 
			
		||||
        e_actorCount = 128
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    DynamicTreeTest()
 | 
			
		||||
    {
 | 
			
		||||
        m_worldExtent = 15.0f;
 | 
			
		||||
        m_proxyExtent = 0.5f;
 | 
			
		||||
 | 
			
		||||
        srand(888);
 | 
			
		||||
 | 
			
		||||
        for (int32 i = 0; i < e_actorCount; ++i)
 | 
			
		||||
        {
 | 
			
		||||
            Actor* actor = m_actors + i;
 | 
			
		||||
            GetRandomAABB(&actor->aabb);
 | 
			
		||||
            actor->proxyId = m_tree.CreateProxy(actor->aabb, actor);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        m_stepCount = 0;
 | 
			
		||||
 | 
			
		||||
        float32 h = m_worldExtent;
 | 
			
		||||
        m_queryAABB.lowerBound.Set(-3.0f, -4.0f + h);
 | 
			
		||||
        m_queryAABB.upperBound.Set(5.0f, 6.0f + h);
 | 
			
		||||
 | 
			
		||||
        m_rayCastInput.p1.Set(-5.0, 5.0f + h);
 | 
			
		||||
        m_rayCastInput.p2.Set(7.0f, -4.0f + h);
 | 
			
		||||
        //m_rayCastInput.p1.Set(0.0f, 2.0f + h);
 | 
			
		||||
        //m_rayCastInput.p2.Set(0.0f, -2.0f + h);
 | 
			
		||||
        m_rayCastInput.maxFraction = 1.0f;
 | 
			
		||||
 | 
			
		||||
        m_automated = false;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new DynamicTreeTest;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Step(Settings* settings)
 | 
			
		||||
    {
 | 
			
		||||
        B2_NOT_USED(settings);
 | 
			
		||||
 | 
			
		||||
        m_rayActor = NULL;
 | 
			
		||||
        for (int32 i = 0; i < e_actorCount; ++i)
 | 
			
		||||
        {
 | 
			
		||||
            m_actors[i].fraction = 1.0f;
 | 
			
		||||
            m_actors[i].overlap = false;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (m_automated == true)
 | 
			
		||||
        {
 | 
			
		||||
            int32 actionCount = b2Max(1, e_actorCount >> 2);
 | 
			
		||||
 | 
			
		||||
            for (int32 i = 0; i < actionCount; ++i)
 | 
			
		||||
            {
 | 
			
		||||
                Action();
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        Query();
 | 
			
		||||
        RayCast();
 | 
			
		||||
 | 
			
		||||
        for (int32 i = 0; i < e_actorCount; ++i)
 | 
			
		||||
        {
 | 
			
		||||
            Actor* actor = m_actors + i;
 | 
			
		||||
            if (actor->proxyId == b2_nullNode)
 | 
			
		||||
                continue;
 | 
			
		||||
 | 
			
		||||
            b2Color c(0.9f, 0.9f, 0.9f);
 | 
			
		||||
            if (actor == m_rayActor && actor->overlap)
 | 
			
		||||
            {
 | 
			
		||||
                c.Set(0.9f, 0.6f, 0.6f);
 | 
			
		||||
            }
 | 
			
		||||
            else if (actor == m_rayActor)
 | 
			
		||||
            {
 | 
			
		||||
                c.Set(0.6f, 0.9f, 0.6f);
 | 
			
		||||
            }
 | 
			
		||||
            else if (actor->overlap)
 | 
			
		||||
            {
 | 
			
		||||
                c.Set(0.6f, 0.6f, 0.9f);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            m_debugDraw.DrawAABB(&actor->aabb, c);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        b2Color c(0.7f, 0.7f, 0.7f);
 | 
			
		||||
        m_debugDraw.DrawAABB(&m_queryAABB, c);
 | 
			
		||||
 | 
			
		||||
        m_debugDraw.DrawSegment(m_rayCastInput.p1, m_rayCastInput.p2, c);
 | 
			
		||||
 | 
			
		||||
        b2Color c1(0.2f, 0.9f, 0.2f);
 | 
			
		||||
        b2Color c2(0.9f, 0.2f, 0.2f);
 | 
			
		||||
        m_debugDraw.DrawPoint(m_rayCastInput.p1, 6.0f, c1);
 | 
			
		||||
        m_debugDraw.DrawPoint(m_rayCastInput.p2, 6.0f, c2);
 | 
			
		||||
 | 
			
		||||
        if (m_rayActor)
 | 
			
		||||
        {
 | 
			
		||||
            b2Color cr(0.2f, 0.2f, 0.9f);
 | 
			
		||||
            b2Vec2 p = m_rayCastInput.p1 + m_rayActor->fraction * (m_rayCastInput.p2 - m_rayCastInput.p1);
 | 
			
		||||
            m_debugDraw.DrawPoint(p, 6.0f, cr);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            int32 height = m_tree.GetHeight();
 | 
			
		||||
            m_debugDraw.DrawString(5, m_textLine, "dynamic tree height = %d", height);
 | 
			
		||||
            m_textLine += 15;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        ++m_stepCount;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Keyboard(unsigned char key)
 | 
			
		||||
    {
 | 
			
		||||
        switch (key)
 | 
			
		||||
        {
 | 
			
		||||
        case 'a':
 | 
			
		||||
            m_automated = !m_automated;
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case 'c':
 | 
			
		||||
            CreateProxy();
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case 'd':
 | 
			
		||||
            DestroyProxy();
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case 'm':
 | 
			
		||||
            MoveProxy();
 | 
			
		||||
            break;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    bool QueryCallback(int32 proxyId)
 | 
			
		||||
    {
 | 
			
		||||
        Actor* actor = (Actor*)m_tree.GetUserData(proxyId);
 | 
			
		||||
        actor->overlap = b2TestOverlap(m_queryAABB, actor->aabb);
 | 
			
		||||
        return true;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    float32 RayCastCallback(const b2RayCastInput& input, int32 proxyId)
 | 
			
		||||
    {
 | 
			
		||||
        Actor* actor = (Actor*)m_tree.GetUserData(proxyId);
 | 
			
		||||
 | 
			
		||||
        b2RayCastOutput output;
 | 
			
		||||
        bool hit = actor->aabb.RayCast(&output, input);
 | 
			
		||||
 | 
			
		||||
        if (hit)
 | 
			
		||||
        {
 | 
			
		||||
            m_rayCastOutput = output;
 | 
			
		||||
            m_rayActor = actor;
 | 
			
		||||
            m_rayActor->fraction = output.fraction;
 | 
			
		||||
            return output.fraction;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        return input.maxFraction;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
private:
 | 
			
		||||
 | 
			
		||||
    struct Actor
 | 
			
		||||
    {
 | 
			
		||||
        b2AABB aabb;
 | 
			
		||||
        float32 fraction;
 | 
			
		||||
        bool overlap;
 | 
			
		||||
        int32 proxyId;
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    void GetRandomAABB(b2AABB* aabb)
 | 
			
		||||
    {
 | 
			
		||||
        b2Vec2 w; w.Set(2.0f * m_proxyExtent, 2.0f * m_proxyExtent);
 | 
			
		||||
        //aabb->lowerBound.x = -m_proxyExtent;
 | 
			
		||||
        //aabb->lowerBound.y = -m_proxyExtent + m_worldExtent;
 | 
			
		||||
        aabb->lowerBound.x = RandomFloat(-m_worldExtent, m_worldExtent);
 | 
			
		||||
        aabb->lowerBound.y = RandomFloat(0.0f, 2.0f * m_worldExtent);
 | 
			
		||||
        aabb->upperBound = aabb->lowerBound + w;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void MoveAABB(b2AABB* aabb)
 | 
			
		||||
    {
 | 
			
		||||
        b2Vec2 d;
 | 
			
		||||
        d.x = RandomFloat(-0.5f, 0.5f);
 | 
			
		||||
        d.y = RandomFloat(-0.5f, 0.5f);
 | 
			
		||||
        //d.x = 2.0f;
 | 
			
		||||
        //d.y = 0.0f;
 | 
			
		||||
        aabb->lowerBound += d;
 | 
			
		||||
        aabb->upperBound += d;
 | 
			
		||||
 | 
			
		||||
        b2Vec2 c0 = 0.5f * (aabb->lowerBound + aabb->upperBound);
 | 
			
		||||
        b2Vec2 min; min.Set(-m_worldExtent, 0.0f);
 | 
			
		||||
        b2Vec2 max; max.Set(m_worldExtent, 2.0f * m_worldExtent);
 | 
			
		||||
        b2Vec2 c = b2Clamp(c0, min, max);
 | 
			
		||||
 | 
			
		||||
        aabb->lowerBound += c - c0;
 | 
			
		||||
        aabb->upperBound += c - c0;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void CreateProxy()
 | 
			
		||||
    {
 | 
			
		||||
        for (int32 i = 0; i < e_actorCount; ++i)
 | 
			
		||||
        {
 | 
			
		||||
            int32 j = rand() % e_actorCount;
 | 
			
		||||
            Actor* actor = m_actors + j;
 | 
			
		||||
            if (actor->proxyId == b2_nullNode)
 | 
			
		||||
            {
 | 
			
		||||
                GetRandomAABB(&actor->aabb);
 | 
			
		||||
                actor->proxyId = m_tree.CreateProxy(actor->aabb, actor);
 | 
			
		||||
                return;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void DestroyProxy()
 | 
			
		||||
    {
 | 
			
		||||
        for (int32 i = 0; i < e_actorCount; ++i)
 | 
			
		||||
        {
 | 
			
		||||
            int32 j = rand() % e_actorCount;
 | 
			
		||||
            Actor* actor = m_actors + j;
 | 
			
		||||
            if (actor->proxyId != b2_nullNode)
 | 
			
		||||
            {
 | 
			
		||||
                m_tree.DestroyProxy(actor->proxyId);
 | 
			
		||||
                actor->proxyId = b2_nullNode;
 | 
			
		||||
                return;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void MoveProxy()
 | 
			
		||||
    {
 | 
			
		||||
        for (int32 i = 0; i < e_actorCount; ++i)
 | 
			
		||||
        {
 | 
			
		||||
            int32 j = rand() % e_actorCount;
 | 
			
		||||
            Actor* actor = m_actors + j;
 | 
			
		||||
            if (actor->proxyId == b2_nullNode)
 | 
			
		||||
            {
 | 
			
		||||
                continue;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            b2AABB aabb0 = actor->aabb;
 | 
			
		||||
            MoveAABB(&actor->aabb);
 | 
			
		||||
            b2Vec2 displacement = actor->aabb.GetCenter() - aabb0.GetCenter();
 | 
			
		||||
            m_tree.MoveProxy(actor->proxyId, actor->aabb, displacement);
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Action()
 | 
			
		||||
    {
 | 
			
		||||
        int32 choice = rand() % 20;
 | 
			
		||||
 | 
			
		||||
        switch (choice)
 | 
			
		||||
        {
 | 
			
		||||
        case 0:
 | 
			
		||||
            CreateProxy();
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case 1:
 | 
			
		||||
            DestroyProxy();
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        default:
 | 
			
		||||
            MoveProxy();
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Query()
 | 
			
		||||
    {
 | 
			
		||||
        m_tree.Query(this, m_queryAABB);
 | 
			
		||||
 | 
			
		||||
        for (int32 i = 0; i < e_actorCount; ++i)
 | 
			
		||||
        {
 | 
			
		||||
            if (m_actors[i].proxyId == b2_nullNode)
 | 
			
		||||
            {
 | 
			
		||||
                continue;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            bool overlap = b2TestOverlap(m_queryAABB, m_actors[i].aabb);
 | 
			
		||||
            B2_NOT_USED(overlap);
 | 
			
		||||
            b2Assert(overlap == m_actors[i].overlap);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void RayCast()
 | 
			
		||||
    {
 | 
			
		||||
        m_rayActor = NULL;
 | 
			
		||||
 | 
			
		||||
        b2RayCastInput input = m_rayCastInput;
 | 
			
		||||
 | 
			
		||||
        // Ray cast against the dynamic tree.
 | 
			
		||||
        m_tree.RayCast(this, input);
 | 
			
		||||
 | 
			
		||||
        // Brute force ray cast.
 | 
			
		||||
        Actor* bruteActor = NULL;
 | 
			
		||||
        b2RayCastOutput bruteOutput;
 | 
			
		||||
        for (int32 i = 0; i < e_actorCount; ++i)
 | 
			
		||||
        {
 | 
			
		||||
            if (m_actors[i].proxyId == b2_nullNode)
 | 
			
		||||
            {
 | 
			
		||||
                continue;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            b2RayCastOutput output;
 | 
			
		||||
            bool hit = m_actors[i].aabb.RayCast(&output, input);
 | 
			
		||||
            if (hit)
 | 
			
		||||
            {
 | 
			
		||||
                bruteActor = m_actors + i;
 | 
			
		||||
                bruteOutput = output;
 | 
			
		||||
                input.maxFraction = output.fraction;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (bruteActor != NULL)
 | 
			
		||||
        {
 | 
			
		||||
            b2Assert(bruteOutput.fraction == m_rayCastOutput.fraction);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    float32 m_worldExtent;
 | 
			
		||||
    float32 m_proxyExtent;
 | 
			
		||||
 | 
			
		||||
    b2DynamicTree m_tree;
 | 
			
		||||
    b2AABB m_queryAABB;
 | 
			
		||||
    b2RayCastInput m_rayCastInput;
 | 
			
		||||
    b2RayCastOutput m_rayCastOutput;
 | 
			
		||||
    Actor* m_rayActor;
 | 
			
		||||
    Actor m_actors[e_actorCount];
 | 
			
		||||
    int32 m_stepCount;
 | 
			
		||||
    bool m_automated;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2009 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef DYNAMIC_TREE_TEST_H
 | 
			
		||||
#define DYNAMIC_TREE_TEST_H
 | 
			
		||||
 | 
			
		||||
class DynamicTreeTest : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
 | 
			
		||||
    enum
 | 
			
		||||
    {
 | 
			
		||||
        e_actorCount = 128
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    DynamicTreeTest()
 | 
			
		||||
    {
 | 
			
		||||
        m_worldExtent = 15.0f;
 | 
			
		||||
        m_proxyExtent = 0.5f;
 | 
			
		||||
 | 
			
		||||
        srand(888);
 | 
			
		||||
 | 
			
		||||
        for (int32 i = 0; i < e_actorCount; ++i)
 | 
			
		||||
        {
 | 
			
		||||
            Actor* actor = m_actors + i;
 | 
			
		||||
            GetRandomAABB(&actor->aabb);
 | 
			
		||||
            actor->proxyId = m_tree.CreateProxy(actor->aabb, actor);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        m_stepCount = 0;
 | 
			
		||||
 | 
			
		||||
        float32 h = m_worldExtent;
 | 
			
		||||
        m_queryAABB.lowerBound.Set(-3.0f, -4.0f + h);
 | 
			
		||||
        m_queryAABB.upperBound.Set(5.0f, 6.0f + h);
 | 
			
		||||
 | 
			
		||||
        m_rayCastInput.p1.Set(-5.0, 5.0f + h);
 | 
			
		||||
        m_rayCastInput.p2.Set(7.0f, -4.0f + h);
 | 
			
		||||
        //m_rayCastInput.p1.Set(0.0f, 2.0f + h);
 | 
			
		||||
        //m_rayCastInput.p2.Set(0.0f, -2.0f + h);
 | 
			
		||||
        m_rayCastInput.maxFraction = 1.0f;
 | 
			
		||||
 | 
			
		||||
        m_automated = false;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new DynamicTreeTest;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Step(Settings* settings)
 | 
			
		||||
    {
 | 
			
		||||
        B2_NOT_USED(settings);
 | 
			
		||||
 | 
			
		||||
        m_rayActor = NULL;
 | 
			
		||||
        for (int32 i = 0; i < e_actorCount; ++i)
 | 
			
		||||
        {
 | 
			
		||||
            m_actors[i].fraction = 1.0f;
 | 
			
		||||
            m_actors[i].overlap = false;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (m_automated == true)
 | 
			
		||||
        {
 | 
			
		||||
            int32 actionCount = b2Max(1, e_actorCount >> 2);
 | 
			
		||||
 | 
			
		||||
            for (int32 i = 0; i < actionCount; ++i)
 | 
			
		||||
            {
 | 
			
		||||
                Action();
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        Query();
 | 
			
		||||
        RayCast();
 | 
			
		||||
 | 
			
		||||
        for (int32 i = 0; i < e_actorCount; ++i)
 | 
			
		||||
        {
 | 
			
		||||
            Actor* actor = m_actors + i;
 | 
			
		||||
            if (actor->proxyId == b2_nullNode)
 | 
			
		||||
                continue;
 | 
			
		||||
 | 
			
		||||
            b2Color c(0.9f, 0.9f, 0.9f);
 | 
			
		||||
            if (actor == m_rayActor && actor->overlap)
 | 
			
		||||
            {
 | 
			
		||||
                c.Set(0.9f, 0.6f, 0.6f);
 | 
			
		||||
            }
 | 
			
		||||
            else if (actor == m_rayActor)
 | 
			
		||||
            {
 | 
			
		||||
                c.Set(0.6f, 0.9f, 0.6f);
 | 
			
		||||
            }
 | 
			
		||||
            else if (actor->overlap)
 | 
			
		||||
            {
 | 
			
		||||
                c.Set(0.6f, 0.6f, 0.9f);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            m_debugDraw.DrawAABB(&actor->aabb, c);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        b2Color c(0.7f, 0.7f, 0.7f);
 | 
			
		||||
        m_debugDraw.DrawAABB(&m_queryAABB, c);
 | 
			
		||||
 | 
			
		||||
        m_debugDraw.DrawSegment(m_rayCastInput.p1, m_rayCastInput.p2, c);
 | 
			
		||||
 | 
			
		||||
        b2Color c1(0.2f, 0.9f, 0.2f);
 | 
			
		||||
        b2Color c2(0.9f, 0.2f, 0.2f);
 | 
			
		||||
        m_debugDraw.DrawPoint(m_rayCastInput.p1, 6.0f, c1);
 | 
			
		||||
        m_debugDraw.DrawPoint(m_rayCastInput.p2, 6.0f, c2);
 | 
			
		||||
 | 
			
		||||
        if (m_rayActor)
 | 
			
		||||
        {
 | 
			
		||||
            b2Color cr(0.2f, 0.2f, 0.9f);
 | 
			
		||||
            b2Vec2 p = m_rayCastInput.p1 + m_rayActor->fraction * (m_rayCastInput.p2 - m_rayCastInput.p1);
 | 
			
		||||
            m_debugDraw.DrawPoint(p, 6.0f, cr);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            int32 height = m_tree.GetHeight();
 | 
			
		||||
            m_debugDraw.DrawString(5, m_textLine, "dynamic tree height = %d", height);
 | 
			
		||||
            m_textLine += 15;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        ++m_stepCount;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Keyboard(unsigned char key)
 | 
			
		||||
    {
 | 
			
		||||
        switch (key)
 | 
			
		||||
        {
 | 
			
		||||
        case 'a':
 | 
			
		||||
            m_automated = !m_automated;
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case 'c':
 | 
			
		||||
            CreateProxy();
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case 'd':
 | 
			
		||||
            DestroyProxy();
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case 'm':
 | 
			
		||||
            MoveProxy();
 | 
			
		||||
            break;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    bool QueryCallback(int32 proxyId)
 | 
			
		||||
    {
 | 
			
		||||
        Actor* actor = (Actor*)m_tree.GetUserData(proxyId);
 | 
			
		||||
        actor->overlap = b2TestOverlap(m_queryAABB, actor->aabb);
 | 
			
		||||
        return true;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    float32 RayCastCallback(const b2RayCastInput& input, int32 proxyId)
 | 
			
		||||
    {
 | 
			
		||||
        Actor* actor = (Actor*)m_tree.GetUserData(proxyId);
 | 
			
		||||
 | 
			
		||||
        b2RayCastOutput output;
 | 
			
		||||
        bool hit = actor->aabb.RayCast(&output, input);
 | 
			
		||||
 | 
			
		||||
        if (hit)
 | 
			
		||||
        {
 | 
			
		||||
            m_rayCastOutput = output;
 | 
			
		||||
            m_rayActor = actor;
 | 
			
		||||
            m_rayActor->fraction = output.fraction;
 | 
			
		||||
            return output.fraction;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        return input.maxFraction;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
private:
 | 
			
		||||
 | 
			
		||||
    struct Actor
 | 
			
		||||
    {
 | 
			
		||||
        b2AABB aabb;
 | 
			
		||||
        float32 fraction;
 | 
			
		||||
        bool overlap;
 | 
			
		||||
        int32 proxyId;
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    void GetRandomAABB(b2AABB* aabb)
 | 
			
		||||
    {
 | 
			
		||||
        b2Vec2 w; w.Set(2.0f * m_proxyExtent, 2.0f * m_proxyExtent);
 | 
			
		||||
        //aabb->lowerBound.x = -m_proxyExtent;
 | 
			
		||||
        //aabb->lowerBound.y = -m_proxyExtent + m_worldExtent;
 | 
			
		||||
        aabb->lowerBound.x = RandomFloat(-m_worldExtent, m_worldExtent);
 | 
			
		||||
        aabb->lowerBound.y = RandomFloat(0.0f, 2.0f * m_worldExtent);
 | 
			
		||||
        aabb->upperBound = aabb->lowerBound + w;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void MoveAABB(b2AABB* aabb)
 | 
			
		||||
    {
 | 
			
		||||
        b2Vec2 d;
 | 
			
		||||
        d.x = RandomFloat(-0.5f, 0.5f);
 | 
			
		||||
        d.y = RandomFloat(-0.5f, 0.5f);
 | 
			
		||||
        //d.x = 2.0f;
 | 
			
		||||
        //d.y = 0.0f;
 | 
			
		||||
        aabb->lowerBound += d;
 | 
			
		||||
        aabb->upperBound += d;
 | 
			
		||||
 | 
			
		||||
        b2Vec2 c0 = 0.5f * (aabb->lowerBound + aabb->upperBound);
 | 
			
		||||
        b2Vec2 min; min.Set(-m_worldExtent, 0.0f);
 | 
			
		||||
        b2Vec2 max; max.Set(m_worldExtent, 2.0f * m_worldExtent);
 | 
			
		||||
        b2Vec2 c = b2Clamp(c0, min, max);
 | 
			
		||||
 | 
			
		||||
        aabb->lowerBound += c - c0;
 | 
			
		||||
        aabb->upperBound += c - c0;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void CreateProxy()
 | 
			
		||||
    {
 | 
			
		||||
        for (int32 i = 0; i < e_actorCount; ++i)
 | 
			
		||||
        {
 | 
			
		||||
            int32 j = rand() % e_actorCount;
 | 
			
		||||
            Actor* actor = m_actors + j;
 | 
			
		||||
            if (actor->proxyId == b2_nullNode)
 | 
			
		||||
            {
 | 
			
		||||
                GetRandomAABB(&actor->aabb);
 | 
			
		||||
                actor->proxyId = m_tree.CreateProxy(actor->aabb, actor);
 | 
			
		||||
                return;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void DestroyProxy()
 | 
			
		||||
    {
 | 
			
		||||
        for (int32 i = 0; i < e_actorCount; ++i)
 | 
			
		||||
        {
 | 
			
		||||
            int32 j = rand() % e_actorCount;
 | 
			
		||||
            Actor* actor = m_actors + j;
 | 
			
		||||
            if (actor->proxyId != b2_nullNode)
 | 
			
		||||
            {
 | 
			
		||||
                m_tree.DestroyProxy(actor->proxyId);
 | 
			
		||||
                actor->proxyId = b2_nullNode;
 | 
			
		||||
                return;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void MoveProxy()
 | 
			
		||||
    {
 | 
			
		||||
        for (int32 i = 0; i < e_actorCount; ++i)
 | 
			
		||||
        {
 | 
			
		||||
            int32 j = rand() % e_actorCount;
 | 
			
		||||
            Actor* actor = m_actors + j;
 | 
			
		||||
            if (actor->proxyId == b2_nullNode)
 | 
			
		||||
            {
 | 
			
		||||
                continue;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            b2AABB aabb0 = actor->aabb;
 | 
			
		||||
            MoveAABB(&actor->aabb);
 | 
			
		||||
            b2Vec2 displacement = actor->aabb.GetCenter() - aabb0.GetCenter();
 | 
			
		||||
            m_tree.MoveProxy(actor->proxyId, actor->aabb, displacement);
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Action()
 | 
			
		||||
    {
 | 
			
		||||
        int32 choice = rand() % 20;
 | 
			
		||||
 | 
			
		||||
        switch (choice)
 | 
			
		||||
        {
 | 
			
		||||
        case 0:
 | 
			
		||||
            CreateProxy();
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case 1:
 | 
			
		||||
            DestroyProxy();
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        default:
 | 
			
		||||
            MoveProxy();
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Query()
 | 
			
		||||
    {
 | 
			
		||||
        m_tree.Query(this, m_queryAABB);
 | 
			
		||||
 | 
			
		||||
        for (int32 i = 0; i < e_actorCount; ++i)
 | 
			
		||||
        {
 | 
			
		||||
            if (m_actors[i].proxyId == b2_nullNode)
 | 
			
		||||
            {
 | 
			
		||||
                continue;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            bool overlap = b2TestOverlap(m_queryAABB, m_actors[i].aabb);
 | 
			
		||||
            B2_NOT_USED(overlap);
 | 
			
		||||
            b2Assert(overlap == m_actors[i].overlap);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void RayCast()
 | 
			
		||||
    {
 | 
			
		||||
        m_rayActor = NULL;
 | 
			
		||||
 | 
			
		||||
        b2RayCastInput input = m_rayCastInput;
 | 
			
		||||
 | 
			
		||||
        // Ray cast against the dynamic tree.
 | 
			
		||||
        m_tree.RayCast(this, input);
 | 
			
		||||
 | 
			
		||||
        // Brute force ray cast.
 | 
			
		||||
        Actor* bruteActor = NULL;
 | 
			
		||||
        b2RayCastOutput bruteOutput;
 | 
			
		||||
        for (int32 i = 0; i < e_actorCount; ++i)
 | 
			
		||||
        {
 | 
			
		||||
            if (m_actors[i].proxyId == b2_nullNode)
 | 
			
		||||
            {
 | 
			
		||||
                continue;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            b2RayCastOutput output;
 | 
			
		||||
            bool hit = m_actors[i].aabb.RayCast(&output, input);
 | 
			
		||||
            if (hit)
 | 
			
		||||
            {
 | 
			
		||||
                bruteActor = m_actors + i;
 | 
			
		||||
                bruteOutput = output;
 | 
			
		||||
                input.maxFraction = output.fraction;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (bruteActor != NULL)
 | 
			
		||||
        {
 | 
			
		||||
            b2Assert(bruteOutput.fraction == m_rayCastOutput.fraction);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    float32 m_worldExtent;
 | 
			
		||||
    float32 m_proxyExtent;
 | 
			
		||||
 | 
			
		||||
    b2DynamicTree m_tree;
 | 
			
		||||
    b2AABB m_queryAABB;
 | 
			
		||||
    b2RayCastInput m_rayCastInput;
 | 
			
		||||
    b2RayCastOutput m_rayCastOutput;
 | 
			
		||||
    Actor* m_rayActor;
 | 
			
		||||
    Actor m_actors[e_actorCount];
 | 
			
		||||
    int32 m_stepCount;
 | 
			
		||||
    bool m_automated;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -1,249 +1,249 @@
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2006-2010 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef EDGE_SHAPES_H
 | 
			
		||||
#define EDGE_SHAPES_H
 | 
			
		||||
 | 
			
		||||
class EdgeShapesCallback : public b2RayCastCallback
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
    EdgeShapesCallback()
 | 
			
		||||
    {
 | 
			
		||||
        m_fixture = NULL;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    float32 ReportFixture(  b2Fixture* fixture, const b2Vec2& point,
 | 
			
		||||
        const b2Vec2& normal, float32 fraction)
 | 
			
		||||
    {
 | 
			
		||||
        m_fixture = fixture;
 | 
			
		||||
        m_point = point;
 | 
			
		||||
        m_normal = normal;
 | 
			
		||||
 | 
			
		||||
        return fraction;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    b2Fixture* m_fixture;
 | 
			
		||||
    b2Vec2 m_point;
 | 
			
		||||
    b2Vec2 m_normal;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
class EdgeShapes : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
 | 
			
		||||
    enum
 | 
			
		||||
    {
 | 
			
		||||
        e_maxBodies = 256
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    EdgeShapes()
 | 
			
		||||
    {
 | 
			
		||||
        // Ground body
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            b2Body* ground = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            float32 x1 = -20.0f;
 | 
			
		||||
            float32 y1 = 2.0f * cosf(x1 / 10.0f * b2_pi);
 | 
			
		||||
            for (int32 i = 0; i < 80; ++i)
 | 
			
		||||
            {
 | 
			
		||||
                float32 x2 = x1 + 0.5f;
 | 
			
		||||
                float32 y2 = 2.0f * cosf(x2 / 10.0f * b2_pi);
 | 
			
		||||
 | 
			
		||||
                b2EdgeShape shape;
 | 
			
		||||
                shape.Set(b2Vec2(x1, y1), b2Vec2(x2, y2));
 | 
			
		||||
                ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
 | 
			
		||||
                x1 = x2;
 | 
			
		||||
                y1 = y2;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2Vec2 vertices[3];
 | 
			
		||||
            vertices[0].Set(-0.5f, 0.0f);
 | 
			
		||||
            vertices[1].Set(0.5f, 0.0f);
 | 
			
		||||
            vertices[2].Set(0.0f, 1.5f);
 | 
			
		||||
            m_polygons[0].Set(vertices, 3);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2Vec2 vertices[3];
 | 
			
		||||
            vertices[0].Set(-0.1f, 0.0f);
 | 
			
		||||
            vertices[1].Set(0.1f, 0.0f);
 | 
			
		||||
            vertices[2].Set(0.0f, 1.5f);
 | 
			
		||||
            m_polygons[1].Set(vertices, 3);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            float32 w = 1.0f;
 | 
			
		||||
            float32 b = w / (2.0f + b2Sqrt(2.0f));
 | 
			
		||||
            float32 s = b2Sqrt(2.0f) * b;
 | 
			
		||||
 | 
			
		||||
            b2Vec2 vertices[8];
 | 
			
		||||
            vertices[0].Set(0.5f * s, 0.0f);
 | 
			
		||||
            vertices[1].Set(0.5f * w, b);
 | 
			
		||||
            vertices[2].Set(0.5f * w, b + s);
 | 
			
		||||
            vertices[3].Set(0.5f * s, w);
 | 
			
		||||
            vertices[4].Set(-0.5f * s, w);
 | 
			
		||||
            vertices[5].Set(-0.5f * w, b + s);
 | 
			
		||||
            vertices[6].Set(-0.5f * w, b);
 | 
			
		||||
            vertices[7].Set(-0.5f * s, 0.0f);
 | 
			
		||||
 | 
			
		||||
            m_polygons[2].Set(vertices, 8);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            m_polygons[3].SetAsBox(0.5f, 0.5f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            m_circle.m_radius = 0.5f;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        m_bodyIndex = 0;
 | 
			
		||||
        memset(m_bodies, 0, sizeof(m_bodies));
 | 
			
		||||
 | 
			
		||||
        m_angle = 0.0f;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Create(int32 index)
 | 
			
		||||
    {
 | 
			
		||||
        if (m_bodies[m_bodyIndex] != NULL)
 | 
			
		||||
        {
 | 
			
		||||
            m_world->DestroyBody(m_bodies[m_bodyIndex]);
 | 
			
		||||
            m_bodies[m_bodyIndex] = NULL;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        b2BodyDef bd;
 | 
			
		||||
 | 
			
		||||
        float32 x = RandomFloat(-10.0f, 10.0f);
 | 
			
		||||
        float32 y = RandomFloat(10.0f, 20.0f);
 | 
			
		||||
        bd.position.Set(x, y);
 | 
			
		||||
        bd.angle = RandomFloat(-b2_pi, b2_pi);
 | 
			
		||||
        bd.type = b2_dynamicBody;
 | 
			
		||||
 | 
			
		||||
        if (index == 4)
 | 
			
		||||
        {
 | 
			
		||||
            bd.angularDamping = 0.02f;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        m_bodies[m_bodyIndex] = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
        if (index < 4)
 | 
			
		||||
        {
 | 
			
		||||
            b2FixtureDef fd;
 | 
			
		||||
            fd.shape = m_polygons + index;
 | 
			
		||||
            fd.friction = 0.3f;
 | 
			
		||||
            fd.density = 20.0f;
 | 
			
		||||
            m_bodies[m_bodyIndex]->CreateFixture(&fd);
 | 
			
		||||
        }
 | 
			
		||||
        else
 | 
			
		||||
        {
 | 
			
		||||
            b2FixtureDef fd;
 | 
			
		||||
            fd.shape = &m_circle;
 | 
			
		||||
            fd.friction = 0.3f;
 | 
			
		||||
            fd.density = 20.0f;
 | 
			
		||||
            m_bodies[m_bodyIndex]->CreateFixture(&fd);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        m_bodyIndex = (m_bodyIndex + 1) % e_maxBodies;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void DestroyBody()
 | 
			
		||||
    {
 | 
			
		||||
        for (int32 i = 0; i < e_maxBodies; ++i)
 | 
			
		||||
        {
 | 
			
		||||
            if (m_bodies[i] != NULL)
 | 
			
		||||
            {
 | 
			
		||||
                m_world->DestroyBody(m_bodies[i]);
 | 
			
		||||
                m_bodies[i] = NULL;
 | 
			
		||||
                return;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Keyboard(unsigned char key)
 | 
			
		||||
    {
 | 
			
		||||
        switch (key)
 | 
			
		||||
        {
 | 
			
		||||
        case '1':
 | 
			
		||||
        case '2':
 | 
			
		||||
        case '3':
 | 
			
		||||
        case '4':
 | 
			
		||||
        case '5':
 | 
			
		||||
            Create(key - '1');
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case 'd':
 | 
			
		||||
            DestroyBody();
 | 
			
		||||
            break;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Step(Settings* settings)
 | 
			
		||||
    {
 | 
			
		||||
        bool advanceRay = settings->pause == 0 || settings->singleStep;
 | 
			
		||||
 | 
			
		||||
        Test::Step(settings);
 | 
			
		||||
        m_debugDraw.DrawString(5, m_textLine, "Press 1-5 to drop stuff");
 | 
			
		||||
        m_textLine += 15;
 | 
			
		||||
 | 
			
		||||
        float32 L = 25.0f;
 | 
			
		||||
        b2Vec2 point1(0.0f, 10.0f);
 | 
			
		||||
        b2Vec2 d(L * cosf(m_angle), -L * b2Abs(sinf(m_angle)));
 | 
			
		||||
        b2Vec2 point2 = point1 + d;
 | 
			
		||||
 | 
			
		||||
        EdgeShapesCallback callback;
 | 
			
		||||
 | 
			
		||||
        m_world->RayCast(&callback, point1, point2);
 | 
			
		||||
 | 
			
		||||
        if (callback.m_fixture)
 | 
			
		||||
        {
 | 
			
		||||
            m_debugDraw.DrawPoint(callback.m_point, 5.0f, b2Color(0.4f, 0.9f, 0.4f));
 | 
			
		||||
 | 
			
		||||
            m_debugDraw.DrawSegment(point1, callback.m_point, b2Color(0.8f, 0.8f, 0.8f));
 | 
			
		||||
 | 
			
		||||
            b2Vec2 head = callback.m_point + 0.5f * callback.m_normal;
 | 
			
		||||
            m_debugDraw.DrawSegment(callback.m_point, head, b2Color(0.9f, 0.9f, 0.4f));
 | 
			
		||||
        }
 | 
			
		||||
        else
 | 
			
		||||
        {
 | 
			
		||||
            m_debugDraw.DrawSegment(point1, point2, b2Color(0.8f, 0.8f, 0.8f));
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (advanceRay)
 | 
			
		||||
        {
 | 
			
		||||
            m_angle += 0.25f * b2_pi / 180.0f;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new EdgeShapes;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    int32 m_bodyIndex;
 | 
			
		||||
    b2Body* m_bodies[e_maxBodies];
 | 
			
		||||
    b2PolygonShape m_polygons[4];
 | 
			
		||||
    b2CircleShape m_circle;
 | 
			
		||||
 | 
			
		||||
    float32 m_angle;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2006-2010 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef EDGE_SHAPES_H
 | 
			
		||||
#define EDGE_SHAPES_H
 | 
			
		||||
 | 
			
		||||
class EdgeShapesCallback : public b2RayCastCallback
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
    EdgeShapesCallback()
 | 
			
		||||
    {
 | 
			
		||||
        m_fixture = NULL;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    float32 ReportFixture(  b2Fixture* fixture, const b2Vec2& point,
 | 
			
		||||
        const b2Vec2& normal, float32 fraction)
 | 
			
		||||
    {
 | 
			
		||||
        m_fixture = fixture;
 | 
			
		||||
        m_point = point;
 | 
			
		||||
        m_normal = normal;
 | 
			
		||||
 | 
			
		||||
        return fraction;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    b2Fixture* m_fixture;
 | 
			
		||||
    b2Vec2 m_point;
 | 
			
		||||
    b2Vec2 m_normal;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
class EdgeShapes : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
 | 
			
		||||
    enum
 | 
			
		||||
    {
 | 
			
		||||
        e_maxBodies = 256
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    EdgeShapes()
 | 
			
		||||
    {
 | 
			
		||||
        // Ground body
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            b2Body* ground = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            float32 x1 = -20.0f;
 | 
			
		||||
            float32 y1 = 2.0f * cosf(x1 / 10.0f * b2_pi);
 | 
			
		||||
            for (int32 i = 0; i < 80; ++i)
 | 
			
		||||
            {
 | 
			
		||||
                float32 x2 = x1 + 0.5f;
 | 
			
		||||
                float32 y2 = 2.0f * cosf(x2 / 10.0f * b2_pi);
 | 
			
		||||
 | 
			
		||||
                b2EdgeShape shape;
 | 
			
		||||
                shape.Set(b2Vec2(x1, y1), b2Vec2(x2, y2));
 | 
			
		||||
                ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
 | 
			
		||||
                x1 = x2;
 | 
			
		||||
                y1 = y2;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2Vec2 vertices[3];
 | 
			
		||||
            vertices[0].Set(-0.5f, 0.0f);
 | 
			
		||||
            vertices[1].Set(0.5f, 0.0f);
 | 
			
		||||
            vertices[2].Set(0.0f, 1.5f);
 | 
			
		||||
            m_polygons[0].Set(vertices, 3);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2Vec2 vertices[3];
 | 
			
		||||
            vertices[0].Set(-0.1f, 0.0f);
 | 
			
		||||
            vertices[1].Set(0.1f, 0.0f);
 | 
			
		||||
            vertices[2].Set(0.0f, 1.5f);
 | 
			
		||||
            m_polygons[1].Set(vertices, 3);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            float32 w = 1.0f;
 | 
			
		||||
            float32 b = w / (2.0f + b2Sqrt(2.0f));
 | 
			
		||||
            float32 s = b2Sqrt(2.0f) * b;
 | 
			
		||||
 | 
			
		||||
            b2Vec2 vertices[8];
 | 
			
		||||
            vertices[0].Set(0.5f * s, 0.0f);
 | 
			
		||||
            vertices[1].Set(0.5f * w, b);
 | 
			
		||||
            vertices[2].Set(0.5f * w, b + s);
 | 
			
		||||
            vertices[3].Set(0.5f * s, w);
 | 
			
		||||
            vertices[4].Set(-0.5f * s, w);
 | 
			
		||||
            vertices[5].Set(-0.5f * w, b + s);
 | 
			
		||||
            vertices[6].Set(-0.5f * w, b);
 | 
			
		||||
            vertices[7].Set(-0.5f * s, 0.0f);
 | 
			
		||||
 | 
			
		||||
            m_polygons[2].Set(vertices, 8);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            m_polygons[3].SetAsBox(0.5f, 0.5f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            m_circle.m_radius = 0.5f;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        m_bodyIndex = 0;
 | 
			
		||||
        memset(m_bodies, 0, sizeof(m_bodies));
 | 
			
		||||
 | 
			
		||||
        m_angle = 0.0f;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Create(int32 index)
 | 
			
		||||
    {
 | 
			
		||||
        if (m_bodies[m_bodyIndex] != NULL)
 | 
			
		||||
        {
 | 
			
		||||
            m_world->DestroyBody(m_bodies[m_bodyIndex]);
 | 
			
		||||
            m_bodies[m_bodyIndex] = NULL;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        b2BodyDef bd;
 | 
			
		||||
 | 
			
		||||
        float32 x = RandomFloat(-10.0f, 10.0f);
 | 
			
		||||
        float32 y = RandomFloat(10.0f, 20.0f);
 | 
			
		||||
        bd.position.Set(x, y);
 | 
			
		||||
        bd.angle = RandomFloat(-b2_pi, b2_pi);
 | 
			
		||||
        bd.type = b2_dynamicBody;
 | 
			
		||||
 | 
			
		||||
        if (index == 4)
 | 
			
		||||
        {
 | 
			
		||||
            bd.angularDamping = 0.02f;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        m_bodies[m_bodyIndex] = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
        if (index < 4)
 | 
			
		||||
        {
 | 
			
		||||
            b2FixtureDef fd;
 | 
			
		||||
            fd.shape = m_polygons + index;
 | 
			
		||||
            fd.friction = 0.3f;
 | 
			
		||||
            fd.density = 20.0f;
 | 
			
		||||
            m_bodies[m_bodyIndex]->CreateFixture(&fd);
 | 
			
		||||
        }
 | 
			
		||||
        else
 | 
			
		||||
        {
 | 
			
		||||
            b2FixtureDef fd;
 | 
			
		||||
            fd.shape = &m_circle;
 | 
			
		||||
            fd.friction = 0.3f;
 | 
			
		||||
            fd.density = 20.0f;
 | 
			
		||||
            m_bodies[m_bodyIndex]->CreateFixture(&fd);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        m_bodyIndex = (m_bodyIndex + 1) % e_maxBodies;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void DestroyBody()
 | 
			
		||||
    {
 | 
			
		||||
        for (int32 i = 0; i < e_maxBodies; ++i)
 | 
			
		||||
        {
 | 
			
		||||
            if (m_bodies[i] != NULL)
 | 
			
		||||
            {
 | 
			
		||||
                m_world->DestroyBody(m_bodies[i]);
 | 
			
		||||
                m_bodies[i] = NULL;
 | 
			
		||||
                return;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Keyboard(unsigned char key)
 | 
			
		||||
    {
 | 
			
		||||
        switch (key)
 | 
			
		||||
        {
 | 
			
		||||
        case '1':
 | 
			
		||||
        case '2':
 | 
			
		||||
        case '3':
 | 
			
		||||
        case '4':
 | 
			
		||||
        case '5':
 | 
			
		||||
            Create(key - '1');
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case 'd':
 | 
			
		||||
            DestroyBody();
 | 
			
		||||
            break;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Step(Settings* settings)
 | 
			
		||||
    {
 | 
			
		||||
        bool advanceRay = settings->pause == 0 || settings->singleStep;
 | 
			
		||||
 | 
			
		||||
        Test::Step(settings);
 | 
			
		||||
        m_debugDraw.DrawString(5, m_textLine, "Press 1-5 to drop stuff");
 | 
			
		||||
        m_textLine += 15;
 | 
			
		||||
 | 
			
		||||
        float32 L = 25.0f;
 | 
			
		||||
        b2Vec2 point1(0.0f, 10.0f);
 | 
			
		||||
        b2Vec2 d(L * cosf(m_angle), -L * b2Abs(sinf(m_angle)));
 | 
			
		||||
        b2Vec2 point2 = point1 + d;
 | 
			
		||||
 | 
			
		||||
        EdgeShapesCallback callback;
 | 
			
		||||
 | 
			
		||||
        m_world->RayCast(&callback, point1, point2);
 | 
			
		||||
 | 
			
		||||
        if (callback.m_fixture)
 | 
			
		||||
        {
 | 
			
		||||
            m_debugDraw.DrawPoint(callback.m_point, 5.0f, b2Color(0.4f, 0.9f, 0.4f));
 | 
			
		||||
 | 
			
		||||
            m_debugDraw.DrawSegment(point1, callback.m_point, b2Color(0.8f, 0.8f, 0.8f));
 | 
			
		||||
 | 
			
		||||
            b2Vec2 head = callback.m_point + 0.5f * callback.m_normal;
 | 
			
		||||
            m_debugDraw.DrawSegment(callback.m_point, head, b2Color(0.9f, 0.9f, 0.4f));
 | 
			
		||||
        }
 | 
			
		||||
        else
 | 
			
		||||
        {
 | 
			
		||||
            m_debugDraw.DrawSegment(point1, point2, b2Color(0.8f, 0.8f, 0.8f));
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (advanceRay)
 | 
			
		||||
        {
 | 
			
		||||
            m_angle += 0.25f * b2_pi / 180.0f;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new EdgeShapes;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    int32 m_bodyIndex;
 | 
			
		||||
    b2Body* m_bodies[e_maxBodies];
 | 
			
		||||
    b2PolygonShape m_polygons[4];
 | 
			
		||||
    b2CircleShape m_circle;
 | 
			
		||||
 | 
			
		||||
    float32 m_angle;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -1,109 +1,109 @@
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2006-2010 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef EDGE_TEST_H
 | 
			
		||||
#define EDGE_TEST_H
 | 
			
		||||
 | 
			
		||||
class EdgeTest : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
 | 
			
		||||
    EdgeTest()
 | 
			
		||||
    {
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            b2Body* ground = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2Vec2 v1(-10.0f, 0.0f), v2(-7.0f, -2.0f), v3(-4.0f, 0.0f);
 | 
			
		||||
            b2Vec2 v4(0.0f, 0.0f), v5(4.0f, 0.0f), v6(7.0f, 2.0f), v7(10.0f, 0.0f);
 | 
			
		||||
 | 
			
		||||
            b2EdgeShape shape;
 | 
			
		||||
 | 
			
		||||
            shape.Set(v1, v2);
 | 
			
		||||
            shape.m_hasVertex3 = true;
 | 
			
		||||
            shape.m_vertex3 = v3;
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
 | 
			
		||||
            shape.Set(v2, v3);
 | 
			
		||||
            shape.m_hasVertex0 = true;
 | 
			
		||||
            shape.m_hasVertex3 = true;
 | 
			
		||||
            shape.m_vertex0 = v1;
 | 
			
		||||
            shape.m_vertex3 = v4;
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
 | 
			
		||||
            shape.Set(v3, v4);
 | 
			
		||||
            shape.m_hasVertex0 = true;
 | 
			
		||||
            shape.m_hasVertex3 = true;
 | 
			
		||||
            shape.m_vertex0 = v2;
 | 
			
		||||
            shape.m_vertex3 = v5;
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
 | 
			
		||||
            shape.Set(v4, v5);
 | 
			
		||||
            shape.m_hasVertex0 = true;
 | 
			
		||||
            shape.m_hasVertex3 = true;
 | 
			
		||||
            shape.m_vertex0 = v3;
 | 
			
		||||
            shape.m_vertex3 = v6;
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
 | 
			
		||||
            shape.Set(v5, v6);
 | 
			
		||||
            shape.m_hasVertex0 = true;
 | 
			
		||||
            shape.m_hasVertex3 = true;
 | 
			
		||||
            shape.m_vertex0 = v4;
 | 
			
		||||
            shape.m_vertex3 = v7;
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
 | 
			
		||||
            shape.Set(v6, v7);
 | 
			
		||||
            shape.m_hasVertex0 = true;
 | 
			
		||||
            shape.m_vertex0 = v5;
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
            bd.position.Set(-0.5f, 0.6f);
 | 
			
		||||
            bd.allowSleep = false;
 | 
			
		||||
            b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2CircleShape shape;
 | 
			
		||||
            shape.m_radius = 0.5f;
 | 
			
		||||
 | 
			
		||||
            body->CreateFixture(&shape, 1.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
            bd.position.Set(1.0f, 0.6f);
 | 
			
		||||
            bd.allowSleep = false;
 | 
			
		||||
            b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(0.5f, 0.5f);
 | 
			
		||||
 | 
			
		||||
            body->CreateFixture(&shape, 1.0f);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new EdgeTest;
 | 
			
		||||
    }
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2006-2010 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef EDGE_TEST_H
 | 
			
		||||
#define EDGE_TEST_H
 | 
			
		||||
 | 
			
		||||
class EdgeTest : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
 | 
			
		||||
    EdgeTest()
 | 
			
		||||
    {
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            b2Body* ground = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2Vec2 v1(-10.0f, 0.0f), v2(-7.0f, -2.0f), v3(-4.0f, 0.0f);
 | 
			
		||||
            b2Vec2 v4(0.0f, 0.0f), v5(4.0f, 0.0f), v6(7.0f, 2.0f), v7(10.0f, 0.0f);
 | 
			
		||||
 | 
			
		||||
            b2EdgeShape shape;
 | 
			
		||||
 | 
			
		||||
            shape.Set(v1, v2);
 | 
			
		||||
            shape.m_hasVertex3 = true;
 | 
			
		||||
            shape.m_vertex3 = v3;
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
 | 
			
		||||
            shape.Set(v2, v3);
 | 
			
		||||
            shape.m_hasVertex0 = true;
 | 
			
		||||
            shape.m_hasVertex3 = true;
 | 
			
		||||
            shape.m_vertex0 = v1;
 | 
			
		||||
            shape.m_vertex3 = v4;
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
 | 
			
		||||
            shape.Set(v3, v4);
 | 
			
		||||
            shape.m_hasVertex0 = true;
 | 
			
		||||
            shape.m_hasVertex3 = true;
 | 
			
		||||
            shape.m_vertex0 = v2;
 | 
			
		||||
            shape.m_vertex3 = v5;
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
 | 
			
		||||
            shape.Set(v4, v5);
 | 
			
		||||
            shape.m_hasVertex0 = true;
 | 
			
		||||
            shape.m_hasVertex3 = true;
 | 
			
		||||
            shape.m_vertex0 = v3;
 | 
			
		||||
            shape.m_vertex3 = v6;
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
 | 
			
		||||
            shape.Set(v5, v6);
 | 
			
		||||
            shape.m_hasVertex0 = true;
 | 
			
		||||
            shape.m_hasVertex3 = true;
 | 
			
		||||
            shape.m_vertex0 = v4;
 | 
			
		||||
            shape.m_vertex3 = v7;
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
 | 
			
		||||
            shape.Set(v6, v7);
 | 
			
		||||
            shape.m_hasVertex0 = true;
 | 
			
		||||
            shape.m_vertex0 = v5;
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
            bd.position.Set(-0.5f, 0.6f);
 | 
			
		||||
            bd.allowSleep = false;
 | 
			
		||||
            b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2CircleShape shape;
 | 
			
		||||
            shape.m_radius = 0.5f;
 | 
			
		||||
 | 
			
		||||
            body->CreateFixture(&shape, 1.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
            bd.position.Set(1.0f, 0.6f);
 | 
			
		||||
            bd.allowSleep = false;
 | 
			
		||||
            b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(0.5f, 0.5f);
 | 
			
		||||
 | 
			
		||||
            body->CreateFixture(&shape, 1.0f);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new EdgeTest;
 | 
			
		||||
    }
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -1,187 +1,187 @@
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2007-2009 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef GEARS_H
 | 
			
		||||
#define GEARS_H
 | 
			
		||||
 | 
			
		||||
class Gears : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
    Gears()
 | 
			
		||||
    {
 | 
			
		||||
        b2Body* ground = NULL;
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            ground = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2EdgeShape shape;
 | 
			
		||||
            shape.Set(b2Vec2(50.0f, 0.0f), b2Vec2(-50.0f, 0.0f));
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Gears co
 | 
			
		||||
        {
 | 
			
		||||
            b2CircleShape circle1;
 | 
			
		||||
            circle1.m_radius = 1.0f;
 | 
			
		||||
 | 
			
		||||
            b2PolygonShape box;
 | 
			
		||||
            box.SetAsBox(0.5f, 5.0f);
 | 
			
		||||
 | 
			
		||||
            b2CircleShape circle2;
 | 
			
		||||
            circle2.m_radius = 2.0f;
 | 
			
		||||
 | 
			
		||||
            b2BodyDef bd1;
 | 
			
		||||
            bd1.type = b2_staticBody;
 | 
			
		||||
            bd1.position.Set(10.0f, 9.0f);
 | 
			
		||||
            b2Body* body1 = m_world->CreateBody(&bd1);
 | 
			
		||||
            body1->CreateFixture(&circle1, 0.0f);
 | 
			
		||||
 | 
			
		||||
            b2BodyDef bd2;
 | 
			
		||||
            bd2.type = b2_dynamicBody;
 | 
			
		||||
            bd2.position.Set(10.0f, 8.0f);
 | 
			
		||||
            b2Body* body2 = m_world->CreateBody(&bd2);
 | 
			
		||||
            body2->CreateFixture(&box, 5.0f);
 | 
			
		||||
 | 
			
		||||
            b2BodyDef bd3;
 | 
			
		||||
            bd3.type = b2_dynamicBody;
 | 
			
		||||
            bd3.position.Set(10.0f, 6.0f);
 | 
			
		||||
            b2Body* body3 = m_world->CreateBody(&bd3);
 | 
			
		||||
            body3->CreateFixture(&circle2, 5.0f);
 | 
			
		||||
 | 
			
		||||
            b2RevoluteJointDef jd1;
 | 
			
		||||
            jd1.Initialize(body2, body1, bd1.position);
 | 
			
		||||
            b2Joint* joint1 = m_world->CreateJoint(&jd1);
 | 
			
		||||
 | 
			
		||||
            b2RevoluteJointDef jd2;
 | 
			
		||||
            jd2.Initialize(body2, body3, bd3.position);
 | 
			
		||||
            b2Joint* joint2 = m_world->CreateJoint(&jd2);
 | 
			
		||||
 | 
			
		||||
            b2GearJointDef jd4;
 | 
			
		||||
            jd4.bodyA = body1;
 | 
			
		||||
            jd4.bodyB = body3;
 | 
			
		||||
            jd4.joint1 = joint1;
 | 
			
		||||
            jd4.joint2 = joint2;
 | 
			
		||||
            jd4.ratio = circle2.m_radius / circle1.m_radius;
 | 
			
		||||
            m_world->CreateJoint(&jd4);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2CircleShape circle1;
 | 
			
		||||
            circle1.m_radius = 1.0f;
 | 
			
		||||
 | 
			
		||||
            b2CircleShape circle2;
 | 
			
		||||
            circle2.m_radius = 2.0f;
 | 
			
		||||
 | 
			
		||||
            b2PolygonShape box;
 | 
			
		||||
            box.SetAsBox(0.5f, 5.0f);
 | 
			
		||||
 | 
			
		||||
            b2BodyDef bd1;
 | 
			
		||||
            bd1.type = b2_dynamicBody;
 | 
			
		||||
            bd1.position.Set(-3.0f, 12.0f);
 | 
			
		||||
            b2Body* body1 = m_world->CreateBody(&bd1);
 | 
			
		||||
            body1->CreateFixture(&circle1, 5.0f);
 | 
			
		||||
 | 
			
		||||
            b2RevoluteJointDef jd1;
 | 
			
		||||
            jd1.bodyA = ground;
 | 
			
		||||
            jd1.bodyB = body1;
 | 
			
		||||
            jd1.localAnchorA = ground->GetLocalPoint(bd1.position);
 | 
			
		||||
            jd1.localAnchorB = body1->GetLocalPoint(bd1.position);
 | 
			
		||||
            jd1.referenceAngle = body1->GetAngle() - ground->GetAngle();
 | 
			
		||||
            m_joint1 = (b2RevoluteJoint*)m_world->CreateJoint(&jd1);
 | 
			
		||||
 | 
			
		||||
            b2BodyDef bd2;
 | 
			
		||||
            bd2.type = b2_dynamicBody;
 | 
			
		||||
            bd2.position.Set(0.0f, 12.0f);
 | 
			
		||||
            b2Body* body2 = m_world->CreateBody(&bd2);
 | 
			
		||||
            body2->CreateFixture(&circle2, 5.0f);
 | 
			
		||||
 | 
			
		||||
            b2RevoluteJointDef jd2;
 | 
			
		||||
            jd2.Initialize(ground, body2, bd2.position);
 | 
			
		||||
            m_joint2 = (b2RevoluteJoint*)m_world->CreateJoint(&jd2);
 | 
			
		||||
 | 
			
		||||
            b2BodyDef bd3;
 | 
			
		||||
            bd3.type = b2_dynamicBody;
 | 
			
		||||
            bd3.position.Set(2.5f, 12.0f);
 | 
			
		||||
            b2Body* body3 = m_world->CreateBody(&bd3);
 | 
			
		||||
            body3->CreateFixture(&box, 5.0f);
 | 
			
		||||
 | 
			
		||||
            b2PrismaticJointDef jd3;
 | 
			
		||||
            jd3.Initialize(ground, body3, bd3.position, b2Vec2(0.0f, 1.0f));
 | 
			
		||||
            jd3.lowerTranslation = -5.0f;
 | 
			
		||||
            jd3.upperTranslation = 5.0f;
 | 
			
		||||
            jd3.enableLimit = true;
 | 
			
		||||
 | 
			
		||||
            m_joint3 = (b2PrismaticJoint*)m_world->CreateJoint(&jd3);
 | 
			
		||||
 | 
			
		||||
            b2GearJointDef jd4;
 | 
			
		||||
            jd4.bodyA = body1;
 | 
			
		||||
            jd4.bodyB = body2;
 | 
			
		||||
            jd4.joint1 = m_joint1;
 | 
			
		||||
            jd4.joint2 = m_joint2;
 | 
			
		||||
            jd4.ratio = circle2.m_radius / circle1.m_radius;
 | 
			
		||||
            m_joint4 = (b2GearJoint*)m_world->CreateJoint(&jd4);
 | 
			
		||||
 | 
			
		||||
            b2GearJointDef jd5;
 | 
			
		||||
            jd5.bodyA = body2;
 | 
			
		||||
            jd5.bodyB = body3;
 | 
			
		||||
            jd5.joint1 = m_joint2;
 | 
			
		||||
            jd5.joint2 = m_joint3;
 | 
			
		||||
            jd5.ratio = -1.0f / circle2.m_radius;
 | 
			
		||||
            m_joint5 = (b2GearJoint*)m_world->CreateJoint(&jd5);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Keyboard(unsigned char key)
 | 
			
		||||
    {
 | 
			
		||||
        switch (key)
 | 
			
		||||
        {
 | 
			
		||||
        case 0:
 | 
			
		||||
            break;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Step(Settings* settings)
 | 
			
		||||
    {
 | 
			
		||||
        Test::Step(settings);
 | 
			
		||||
 | 
			
		||||
        float32 ratio, value;
 | 
			
		||||
 | 
			
		||||
        ratio = m_joint4->GetRatio();
 | 
			
		||||
        value = m_joint1->GetJointAngle() + ratio * m_joint2->GetJointAngle();
 | 
			
		||||
        m_debugDraw.DrawString(5, m_textLine, "theta1 + %4.2f * theta2 = %4.2f", (float) ratio, (float) value);
 | 
			
		||||
        m_textLine += 15;
 | 
			
		||||
 | 
			
		||||
        ratio = m_joint5->GetRatio();
 | 
			
		||||
        value = m_joint2->GetJointAngle() + ratio * m_joint3->GetJointTranslation();
 | 
			
		||||
        m_debugDraw.DrawString(5, m_textLine, "theta2 + %4.2f * delta = %4.2f", (float) ratio, (float) value);
 | 
			
		||||
        m_textLine += 15;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new Gears;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    b2RevoluteJoint* m_joint1;
 | 
			
		||||
    b2RevoluteJoint* m_joint2;
 | 
			
		||||
    b2PrismaticJoint* m_joint3;
 | 
			
		||||
    b2GearJoint* m_joint4;
 | 
			
		||||
    b2GearJoint* m_joint5;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2007-2009 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef GEARS_H
 | 
			
		||||
#define GEARS_H
 | 
			
		||||
 | 
			
		||||
class Gears : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
    Gears()
 | 
			
		||||
    {
 | 
			
		||||
        b2Body* ground = NULL;
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            ground = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2EdgeShape shape;
 | 
			
		||||
            shape.Set(b2Vec2(50.0f, 0.0f), b2Vec2(-50.0f, 0.0f));
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Gears co
 | 
			
		||||
        {
 | 
			
		||||
            b2CircleShape circle1;
 | 
			
		||||
            circle1.m_radius = 1.0f;
 | 
			
		||||
 | 
			
		||||
            b2PolygonShape box;
 | 
			
		||||
            box.SetAsBox(0.5f, 5.0f);
 | 
			
		||||
 | 
			
		||||
            b2CircleShape circle2;
 | 
			
		||||
            circle2.m_radius = 2.0f;
 | 
			
		||||
 | 
			
		||||
            b2BodyDef bd1;
 | 
			
		||||
            bd1.type = b2_staticBody;
 | 
			
		||||
            bd1.position.Set(10.0f, 9.0f);
 | 
			
		||||
            b2Body* body1 = m_world->CreateBody(&bd1);
 | 
			
		||||
            body1->CreateFixture(&circle1, 0.0f);
 | 
			
		||||
 | 
			
		||||
            b2BodyDef bd2;
 | 
			
		||||
            bd2.type = b2_dynamicBody;
 | 
			
		||||
            bd2.position.Set(10.0f, 8.0f);
 | 
			
		||||
            b2Body* body2 = m_world->CreateBody(&bd2);
 | 
			
		||||
            body2->CreateFixture(&box, 5.0f);
 | 
			
		||||
 | 
			
		||||
            b2BodyDef bd3;
 | 
			
		||||
            bd3.type = b2_dynamicBody;
 | 
			
		||||
            bd3.position.Set(10.0f, 6.0f);
 | 
			
		||||
            b2Body* body3 = m_world->CreateBody(&bd3);
 | 
			
		||||
            body3->CreateFixture(&circle2, 5.0f);
 | 
			
		||||
 | 
			
		||||
            b2RevoluteJointDef jd1;
 | 
			
		||||
            jd1.Initialize(body2, body1, bd1.position);
 | 
			
		||||
            b2Joint* joint1 = m_world->CreateJoint(&jd1);
 | 
			
		||||
 | 
			
		||||
            b2RevoluteJointDef jd2;
 | 
			
		||||
            jd2.Initialize(body2, body3, bd3.position);
 | 
			
		||||
            b2Joint* joint2 = m_world->CreateJoint(&jd2);
 | 
			
		||||
 | 
			
		||||
            b2GearJointDef jd4;
 | 
			
		||||
            jd4.bodyA = body1;
 | 
			
		||||
            jd4.bodyB = body3;
 | 
			
		||||
            jd4.joint1 = joint1;
 | 
			
		||||
            jd4.joint2 = joint2;
 | 
			
		||||
            jd4.ratio = circle2.m_radius / circle1.m_radius;
 | 
			
		||||
            m_world->CreateJoint(&jd4);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2CircleShape circle1;
 | 
			
		||||
            circle1.m_radius = 1.0f;
 | 
			
		||||
 | 
			
		||||
            b2CircleShape circle2;
 | 
			
		||||
            circle2.m_radius = 2.0f;
 | 
			
		||||
 | 
			
		||||
            b2PolygonShape box;
 | 
			
		||||
            box.SetAsBox(0.5f, 5.0f);
 | 
			
		||||
 | 
			
		||||
            b2BodyDef bd1;
 | 
			
		||||
            bd1.type = b2_dynamicBody;
 | 
			
		||||
            bd1.position.Set(-3.0f, 12.0f);
 | 
			
		||||
            b2Body* body1 = m_world->CreateBody(&bd1);
 | 
			
		||||
            body1->CreateFixture(&circle1, 5.0f);
 | 
			
		||||
 | 
			
		||||
            b2RevoluteJointDef jd1;
 | 
			
		||||
            jd1.bodyA = ground;
 | 
			
		||||
            jd1.bodyB = body1;
 | 
			
		||||
            jd1.localAnchorA = ground->GetLocalPoint(bd1.position);
 | 
			
		||||
            jd1.localAnchorB = body1->GetLocalPoint(bd1.position);
 | 
			
		||||
            jd1.referenceAngle = body1->GetAngle() - ground->GetAngle();
 | 
			
		||||
            m_joint1 = (b2RevoluteJoint*)m_world->CreateJoint(&jd1);
 | 
			
		||||
 | 
			
		||||
            b2BodyDef bd2;
 | 
			
		||||
            bd2.type = b2_dynamicBody;
 | 
			
		||||
            bd2.position.Set(0.0f, 12.0f);
 | 
			
		||||
            b2Body* body2 = m_world->CreateBody(&bd2);
 | 
			
		||||
            body2->CreateFixture(&circle2, 5.0f);
 | 
			
		||||
 | 
			
		||||
            b2RevoluteJointDef jd2;
 | 
			
		||||
            jd2.Initialize(ground, body2, bd2.position);
 | 
			
		||||
            m_joint2 = (b2RevoluteJoint*)m_world->CreateJoint(&jd2);
 | 
			
		||||
 | 
			
		||||
            b2BodyDef bd3;
 | 
			
		||||
            bd3.type = b2_dynamicBody;
 | 
			
		||||
            bd3.position.Set(2.5f, 12.0f);
 | 
			
		||||
            b2Body* body3 = m_world->CreateBody(&bd3);
 | 
			
		||||
            body3->CreateFixture(&box, 5.0f);
 | 
			
		||||
 | 
			
		||||
            b2PrismaticJointDef jd3;
 | 
			
		||||
            jd3.Initialize(ground, body3, bd3.position, b2Vec2(0.0f, 1.0f));
 | 
			
		||||
            jd3.lowerTranslation = -5.0f;
 | 
			
		||||
            jd3.upperTranslation = 5.0f;
 | 
			
		||||
            jd3.enableLimit = true;
 | 
			
		||||
 | 
			
		||||
            m_joint3 = (b2PrismaticJoint*)m_world->CreateJoint(&jd3);
 | 
			
		||||
 | 
			
		||||
            b2GearJointDef jd4;
 | 
			
		||||
            jd4.bodyA = body1;
 | 
			
		||||
            jd4.bodyB = body2;
 | 
			
		||||
            jd4.joint1 = m_joint1;
 | 
			
		||||
            jd4.joint2 = m_joint2;
 | 
			
		||||
            jd4.ratio = circle2.m_radius / circle1.m_radius;
 | 
			
		||||
            m_joint4 = (b2GearJoint*)m_world->CreateJoint(&jd4);
 | 
			
		||||
 | 
			
		||||
            b2GearJointDef jd5;
 | 
			
		||||
            jd5.bodyA = body2;
 | 
			
		||||
            jd5.bodyB = body3;
 | 
			
		||||
            jd5.joint1 = m_joint2;
 | 
			
		||||
            jd5.joint2 = m_joint3;
 | 
			
		||||
            jd5.ratio = -1.0f / circle2.m_radius;
 | 
			
		||||
            m_joint5 = (b2GearJoint*)m_world->CreateJoint(&jd5);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Keyboard(unsigned char key)
 | 
			
		||||
    {
 | 
			
		||||
        switch (key)
 | 
			
		||||
        {
 | 
			
		||||
        case 0:
 | 
			
		||||
            break;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Step(Settings* settings)
 | 
			
		||||
    {
 | 
			
		||||
        Test::Step(settings);
 | 
			
		||||
 | 
			
		||||
        float32 ratio, value;
 | 
			
		||||
 | 
			
		||||
        ratio = m_joint4->GetRatio();
 | 
			
		||||
        value = m_joint1->GetJointAngle() + ratio * m_joint2->GetJointAngle();
 | 
			
		||||
        m_debugDraw.DrawString(5, m_textLine, "theta1 + %4.2f * theta2 = %4.2f", (float) ratio, (float) value);
 | 
			
		||||
        m_textLine += 15;
 | 
			
		||||
 | 
			
		||||
        ratio = m_joint5->GetRatio();
 | 
			
		||||
        value = m_joint2->GetJointAngle() + ratio * m_joint3->GetJointTranslation();
 | 
			
		||||
        m_debugDraw.DrawString(5, m_textLine, "theta2 + %4.2f * delta = %4.2f", (float) ratio, (float) value);
 | 
			
		||||
        m_textLine += 15;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new Gears;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    b2RevoluteJoint* m_joint1;
 | 
			
		||||
    b2RevoluteJoint* m_joint2;
 | 
			
		||||
    b2PrismaticJoint* m_joint3;
 | 
			
		||||
    b2GearJoint* m_joint4;
 | 
			
		||||
    b2GearJoint* m_joint5;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -1,120 +1,120 @@
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2008-2009 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef ONE_SIDED_PLATFORM_H
 | 
			
		||||
#define ONE_SIDED_PLATFORM_H
 | 
			
		||||
 | 
			
		||||
class OneSidedPlatform : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
 | 
			
		||||
    enum State
 | 
			
		||||
    {
 | 
			
		||||
        e_unknown,
 | 
			
		||||
        e_above,
 | 
			
		||||
        e_below
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    OneSidedPlatform()
 | 
			
		||||
    {
 | 
			
		||||
        // Ground
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            b2Body* ground = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2EdgeShape shape;
 | 
			
		||||
            shape.Set(b2Vec2(-20.0f, 0.0f), b2Vec2(20.0f, 0.0f));
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Platform
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.position.Set(0.0f, 10.0f);
 | 
			
		||||
            b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(3.0f, 0.5f);
 | 
			
		||||
            m_platform = body->CreateFixture(&shape, 0.0f);
 | 
			
		||||
 | 
			
		||||
            m_bottom = 10.0f - 0.5f;
 | 
			
		||||
            m_top = 10.0f + 0.5f;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Actor
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
            bd.position.Set(0.0f, 12.0f);
 | 
			
		||||
            b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            m_radius = 0.5f;
 | 
			
		||||
            b2CircleShape shape;
 | 
			
		||||
            shape.m_radius = m_radius;
 | 
			
		||||
            m_character = body->CreateFixture(&shape, 20.0f);
 | 
			
		||||
 | 
			
		||||
            body->SetLinearVelocity(b2Vec2(0.0f, -50.0f));
 | 
			
		||||
 | 
			
		||||
            m_state = e_unknown;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void PreSolve(b2Contact* contact, const b2Manifold* oldManifold)
 | 
			
		||||
    {
 | 
			
		||||
        Test::PreSolve(contact, oldManifold);
 | 
			
		||||
 | 
			
		||||
        b2Fixture* fixtureA = contact->GetFixtureA();
 | 
			
		||||
        b2Fixture* fixtureB = contact->GetFixtureB();
 | 
			
		||||
 | 
			
		||||
        if (fixtureA != m_platform && fixtureA != m_character)
 | 
			
		||||
        {
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (fixtureB != m_platform && fixtureB != m_character)
 | 
			
		||||
        {
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        b2Vec2 position = m_character->GetBody()->GetPosition();
 | 
			
		||||
 | 
			
		||||
        if (position.y < m_top + m_radius - 3.0f * b2_linearSlop)
 | 
			
		||||
        {
 | 
			
		||||
            contact->SetEnabled(false);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Step(Settings* settings)
 | 
			
		||||
    {
 | 
			
		||||
        Test::Step(settings);
 | 
			
		||||
        m_debugDraw.DrawString(5, m_textLine, "Press: (c) create a shape, (d) destroy a shape.");
 | 
			
		||||
        m_textLine += 15;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new OneSidedPlatform;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    float32 m_radius, m_top, m_bottom;
 | 
			
		||||
    State m_state;
 | 
			
		||||
    b2Fixture* m_platform;
 | 
			
		||||
    b2Fixture* m_character;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2008-2009 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef ONE_SIDED_PLATFORM_H
 | 
			
		||||
#define ONE_SIDED_PLATFORM_H
 | 
			
		||||
 | 
			
		||||
class OneSidedPlatform : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
 | 
			
		||||
    enum State
 | 
			
		||||
    {
 | 
			
		||||
        e_unknown,
 | 
			
		||||
        e_above,
 | 
			
		||||
        e_below
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    OneSidedPlatform()
 | 
			
		||||
    {
 | 
			
		||||
        // Ground
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            b2Body* ground = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2EdgeShape shape;
 | 
			
		||||
            shape.Set(b2Vec2(-20.0f, 0.0f), b2Vec2(20.0f, 0.0f));
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Platform
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.position.Set(0.0f, 10.0f);
 | 
			
		||||
            b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(3.0f, 0.5f);
 | 
			
		||||
            m_platform = body->CreateFixture(&shape, 0.0f);
 | 
			
		||||
 | 
			
		||||
            m_bottom = 10.0f - 0.5f;
 | 
			
		||||
            m_top = 10.0f + 0.5f;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Actor
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
            bd.position.Set(0.0f, 12.0f);
 | 
			
		||||
            b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            m_radius = 0.5f;
 | 
			
		||||
            b2CircleShape shape;
 | 
			
		||||
            shape.m_radius = m_radius;
 | 
			
		||||
            m_character = body->CreateFixture(&shape, 20.0f);
 | 
			
		||||
 | 
			
		||||
            body->SetLinearVelocity(b2Vec2(0.0f, -50.0f));
 | 
			
		||||
 | 
			
		||||
            m_state = e_unknown;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void PreSolve(b2Contact* contact, const b2Manifold* oldManifold)
 | 
			
		||||
    {
 | 
			
		||||
        Test::PreSolve(contact, oldManifold);
 | 
			
		||||
 | 
			
		||||
        b2Fixture* fixtureA = contact->GetFixtureA();
 | 
			
		||||
        b2Fixture* fixtureB = contact->GetFixtureB();
 | 
			
		||||
 | 
			
		||||
        if (fixtureA != m_platform && fixtureA != m_character)
 | 
			
		||||
        {
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (fixtureB != m_platform && fixtureB != m_character)
 | 
			
		||||
        {
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        b2Vec2 position = m_character->GetBody()->GetPosition();
 | 
			
		||||
 | 
			
		||||
        if (position.y < m_top + m_radius - 3.0f * b2_linearSlop)
 | 
			
		||||
        {
 | 
			
		||||
            contact->SetEnabled(false);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Step(Settings* settings)
 | 
			
		||||
    {
 | 
			
		||||
        Test::Step(settings);
 | 
			
		||||
        m_debugDraw.DrawString(5, m_textLine, "Press: (c) create a shape, (d) destroy a shape.");
 | 
			
		||||
        m_textLine += 15;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new OneSidedPlatform;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    float32 m_radius, m_top, m_bottom;
 | 
			
		||||
    State m_state;
 | 
			
		||||
    b2Fixture* m_platform;
 | 
			
		||||
    b2Fixture* m_character;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -1,169 +1,169 @@
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2006-2010 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef PINBALL_H
 | 
			
		||||
#define PINBALL_H
 | 
			
		||||
 | 
			
		||||
/// This tests bullet collision and provides an example of a gameplay scenario.
 | 
			
		||||
/// This also uses a loop shape.
 | 
			
		||||
class Pinball : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
    Pinball()
 | 
			
		||||
    {
 | 
			
		||||
        // Ground body
 | 
			
		||||
        b2Body* ground = NULL;
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            ground = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2Vec2 vs[5];
 | 
			
		||||
            vs[0].Set(0.0f, -2.0f);
 | 
			
		||||
            vs[1].Set(8.0f, 6.0f);
 | 
			
		||||
            vs[2].Set(8.0f, 20.0f);
 | 
			
		||||
            vs[3].Set(-8.0f, 20.0f);
 | 
			
		||||
            vs[4].Set(-8.0f, 6.0f);
 | 
			
		||||
 | 
			
		||||
            b2ChainShape loop;
 | 
			
		||||
            loop.CreateLoop(vs, 5);
 | 
			
		||||
            b2FixtureDef fd;
 | 
			
		||||
            fd.shape = &loop;
 | 
			
		||||
            fd.density = 0.0f;
 | 
			
		||||
            ground->CreateFixture(&fd);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Flippers
 | 
			
		||||
        {
 | 
			
		||||
            b2Vec2 p1(-2.0f, 0.0f), p2(2.0f, 0.0f);
 | 
			
		||||
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
 | 
			
		||||
            bd.position = p1;
 | 
			
		||||
            b2Body* leftFlipper = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            bd.position = p2;
 | 
			
		||||
            b2Body* rightFlipper = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2PolygonShape box;
 | 
			
		||||
            box.SetAsBox(1.75f, 0.1f);
 | 
			
		||||
 | 
			
		||||
            b2FixtureDef fd;
 | 
			
		||||
            fd.shape = &box;
 | 
			
		||||
            fd.density = 1.0f;
 | 
			
		||||
 | 
			
		||||
            leftFlipper->CreateFixture(&fd);
 | 
			
		||||
            rightFlipper->CreateFixture(&fd);
 | 
			
		||||
 | 
			
		||||
            b2RevoluteJointDef jd;
 | 
			
		||||
            jd.bodyA = ground;
 | 
			
		||||
            jd.localAnchorB.SetZero();
 | 
			
		||||
            jd.enableMotor = true;
 | 
			
		||||
            jd.maxMotorTorque = 1000.0f;
 | 
			
		||||
            jd.enableLimit = true;
 | 
			
		||||
 | 
			
		||||
            jd.motorSpeed = 0.0f;
 | 
			
		||||
            jd.localAnchorA = p1;
 | 
			
		||||
            jd.bodyB = leftFlipper;
 | 
			
		||||
            jd.lowerAngle = -30.0f * b2_pi / 180.0f;
 | 
			
		||||
            jd.upperAngle = 5.0f * b2_pi / 180.0f;
 | 
			
		||||
            m_leftJoint = (b2RevoluteJoint*)m_world->CreateJoint(&jd);
 | 
			
		||||
 | 
			
		||||
            jd.motorSpeed = 0.0f;
 | 
			
		||||
            jd.localAnchorA = p2;
 | 
			
		||||
            jd.bodyB = rightFlipper;
 | 
			
		||||
            jd.lowerAngle = -5.0f * b2_pi / 180.0f;
 | 
			
		||||
            jd.upperAngle = 30.0f * b2_pi / 180.0f;
 | 
			
		||||
            m_rightJoint = (b2RevoluteJoint*)m_world->CreateJoint(&jd);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Circle character
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.position.Set(1.0f, 15.0f);
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
            bd.bullet = true;
 | 
			
		||||
 | 
			
		||||
            m_ball = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2CircleShape shape;
 | 
			
		||||
            shape.m_radius = 0.2f;
 | 
			
		||||
 | 
			
		||||
            b2FixtureDef fd;
 | 
			
		||||
            fd.shape = &shape;
 | 
			
		||||
            fd.density = 1.0f;
 | 
			
		||||
            m_ball->CreateFixture(&fd);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        m_button = false;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Step()
 | 
			
		||||
    {
 | 
			
		||||
        if (m_button)
 | 
			
		||||
        {
 | 
			
		||||
            m_leftJoint->SetMotorSpeed(20.0f);
 | 
			
		||||
            m_rightJoint->SetMotorSpeed(-20.0f);
 | 
			
		||||
        }
 | 
			
		||||
        else
 | 
			
		||||
        {
 | 
			
		||||
            m_leftJoint->SetMotorSpeed(-10.0f);
 | 
			
		||||
            m_rightJoint->SetMotorSpeed(10.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
//      Test::Step(settings);
 | 
			
		||||
//
 | 
			
		||||
//      m_debugDraw.DrawString(5, m_textLine, "Press 'a' to control the flippers");
 | 
			
		||||
//      m_textLine += 15;
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Keyboard(unsigned char key)
 | 
			
		||||
    {
 | 
			
		||||
        switch (key)
 | 
			
		||||
        {
 | 
			
		||||
        case 'a':
 | 
			
		||||
        case 'A':
 | 
			
		||||
            m_button = true;
 | 
			
		||||
            break;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void KeyboardUp(unsigned char key)
 | 
			
		||||
    {
 | 
			
		||||
        switch (key)
 | 
			
		||||
        {
 | 
			
		||||
        case 'a':
 | 
			
		||||
        case 'A':
 | 
			
		||||
            m_button = false;
 | 
			
		||||
            break;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new Pinball;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    b2RevoluteJoint* m_leftJoint;
 | 
			
		||||
    b2RevoluteJoint* m_rightJoint;
 | 
			
		||||
    b2Body* m_ball;
 | 
			
		||||
    bool m_button;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2006-2010 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef PINBALL_H
 | 
			
		||||
#define PINBALL_H
 | 
			
		||||
 | 
			
		||||
/// This tests bullet collision and provides an example of a gameplay scenario.
 | 
			
		||||
/// This also uses a loop shape.
 | 
			
		||||
class Pinball : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
    Pinball()
 | 
			
		||||
    {
 | 
			
		||||
        // Ground body
 | 
			
		||||
        b2Body* ground = NULL;
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            ground = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2Vec2 vs[5];
 | 
			
		||||
            vs[0].Set(0.0f, -2.0f);
 | 
			
		||||
            vs[1].Set(8.0f, 6.0f);
 | 
			
		||||
            vs[2].Set(8.0f, 20.0f);
 | 
			
		||||
            vs[3].Set(-8.0f, 20.0f);
 | 
			
		||||
            vs[4].Set(-8.0f, 6.0f);
 | 
			
		||||
 | 
			
		||||
            b2ChainShape loop;
 | 
			
		||||
            loop.CreateLoop(vs, 5);
 | 
			
		||||
            b2FixtureDef fd;
 | 
			
		||||
            fd.shape = &loop;
 | 
			
		||||
            fd.density = 0.0f;
 | 
			
		||||
            ground->CreateFixture(&fd);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Flippers
 | 
			
		||||
        {
 | 
			
		||||
            b2Vec2 p1(-2.0f, 0.0f), p2(2.0f, 0.0f);
 | 
			
		||||
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
 | 
			
		||||
            bd.position = p1;
 | 
			
		||||
            b2Body* leftFlipper = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            bd.position = p2;
 | 
			
		||||
            b2Body* rightFlipper = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2PolygonShape box;
 | 
			
		||||
            box.SetAsBox(1.75f, 0.1f);
 | 
			
		||||
 | 
			
		||||
            b2FixtureDef fd;
 | 
			
		||||
            fd.shape = &box;
 | 
			
		||||
            fd.density = 1.0f;
 | 
			
		||||
 | 
			
		||||
            leftFlipper->CreateFixture(&fd);
 | 
			
		||||
            rightFlipper->CreateFixture(&fd);
 | 
			
		||||
 | 
			
		||||
            b2RevoluteJointDef jd;
 | 
			
		||||
            jd.bodyA = ground;
 | 
			
		||||
            jd.localAnchorB.SetZero();
 | 
			
		||||
            jd.enableMotor = true;
 | 
			
		||||
            jd.maxMotorTorque = 1000.0f;
 | 
			
		||||
            jd.enableLimit = true;
 | 
			
		||||
 | 
			
		||||
            jd.motorSpeed = 0.0f;
 | 
			
		||||
            jd.localAnchorA = p1;
 | 
			
		||||
            jd.bodyB = leftFlipper;
 | 
			
		||||
            jd.lowerAngle = -30.0f * b2_pi / 180.0f;
 | 
			
		||||
            jd.upperAngle = 5.0f * b2_pi / 180.0f;
 | 
			
		||||
            m_leftJoint = (b2RevoluteJoint*)m_world->CreateJoint(&jd);
 | 
			
		||||
 | 
			
		||||
            jd.motorSpeed = 0.0f;
 | 
			
		||||
            jd.localAnchorA = p2;
 | 
			
		||||
            jd.bodyB = rightFlipper;
 | 
			
		||||
            jd.lowerAngle = -5.0f * b2_pi / 180.0f;
 | 
			
		||||
            jd.upperAngle = 30.0f * b2_pi / 180.0f;
 | 
			
		||||
            m_rightJoint = (b2RevoluteJoint*)m_world->CreateJoint(&jd);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Circle character
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.position.Set(1.0f, 15.0f);
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
            bd.bullet = true;
 | 
			
		||||
 | 
			
		||||
            m_ball = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2CircleShape shape;
 | 
			
		||||
            shape.m_radius = 0.2f;
 | 
			
		||||
 | 
			
		||||
            b2FixtureDef fd;
 | 
			
		||||
            fd.shape = &shape;
 | 
			
		||||
            fd.density = 1.0f;
 | 
			
		||||
            m_ball->CreateFixture(&fd);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        m_button = false;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Step()
 | 
			
		||||
    {
 | 
			
		||||
        if (m_button)
 | 
			
		||||
        {
 | 
			
		||||
            m_leftJoint->SetMotorSpeed(20.0f);
 | 
			
		||||
            m_rightJoint->SetMotorSpeed(-20.0f);
 | 
			
		||||
        }
 | 
			
		||||
        else
 | 
			
		||||
        {
 | 
			
		||||
            m_leftJoint->SetMotorSpeed(-10.0f);
 | 
			
		||||
            m_rightJoint->SetMotorSpeed(10.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
//      Test::Step(settings);
 | 
			
		||||
//
 | 
			
		||||
//      m_debugDraw.DrawString(5, m_textLine, "Press 'a' to control the flippers");
 | 
			
		||||
//      m_textLine += 15;
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Keyboard(unsigned char key)
 | 
			
		||||
    {
 | 
			
		||||
        switch (key)
 | 
			
		||||
        {
 | 
			
		||||
        case 'a':
 | 
			
		||||
        case 'A':
 | 
			
		||||
            m_button = true;
 | 
			
		||||
            break;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void KeyboardUp(unsigned char key)
 | 
			
		||||
    {
 | 
			
		||||
        switch (key)
 | 
			
		||||
        {
 | 
			
		||||
        case 'a':
 | 
			
		||||
        case 'A':
 | 
			
		||||
            m_button = false;
 | 
			
		||||
            break;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new Pinball;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    b2RevoluteJoint* m_leftJoint;
 | 
			
		||||
    b2RevoluteJoint* m_rightJoint;
 | 
			
		||||
    b2Body* m_ball;
 | 
			
		||||
    bool m_button;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -1,122 +1,122 @@
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef POLYCOLLISION_H
 | 
			
		||||
#define POLYCOLLISION_H
 | 
			
		||||
 | 
			
		||||
class PolyCollision : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
    PolyCollision()
 | 
			
		||||
    {
 | 
			
		||||
        {
 | 
			
		||||
            m_polygonA.SetAsBox(0.2f, 0.4f);
 | 
			
		||||
            m_transformA.Set(b2Vec2(0.0f, 0.0f), 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            m_polygonB.SetAsBox(0.5f, 0.5f);
 | 
			
		||||
            m_positionB.Set(19.345284f, 1.5632932f);
 | 
			
		||||
            m_angleB = 1.9160721f;
 | 
			
		||||
            m_transformB.Set(m_positionB, m_angleB);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new PolyCollision;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Step(Settings* settings)
 | 
			
		||||
    {
 | 
			
		||||
        B2_NOT_USED(settings);
 | 
			
		||||
 | 
			
		||||
        b2Manifold manifold;
 | 
			
		||||
        b2CollidePolygons(&manifold, &m_polygonA, m_transformA, &m_polygonB, m_transformB);
 | 
			
		||||
 | 
			
		||||
        b2WorldManifold worldManifold;
 | 
			
		||||
        worldManifold.Initialize(&manifold, m_transformA, m_polygonA.m_radius, m_transformB, m_polygonB.m_radius);
 | 
			
		||||
 | 
			
		||||
        m_debugDraw.DrawString(5, m_textLine, "point count = %d", manifold.pointCount);
 | 
			
		||||
        m_textLine += 15;
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2Color color(0.9f, 0.9f, 0.9f);
 | 
			
		||||
            b2Vec2 v[b2_maxPolygonVertices];
 | 
			
		||||
            for (int32 i = 0; i < m_polygonA.m_vertexCount; ++i)
 | 
			
		||||
            {
 | 
			
		||||
                v[i] = b2Mul(m_transformA, m_polygonA.m_vertices[i]);
 | 
			
		||||
            }
 | 
			
		||||
            m_debugDraw.DrawPolygon(v, m_polygonA.m_vertexCount, color);
 | 
			
		||||
 | 
			
		||||
            for (int32 i = 0; i < m_polygonB.m_vertexCount; ++i)
 | 
			
		||||
            {
 | 
			
		||||
                v[i] = b2Mul(m_transformB, m_polygonB.m_vertices[i]);
 | 
			
		||||
            }
 | 
			
		||||
            m_debugDraw.DrawPolygon(v, m_polygonB.m_vertexCount, color);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        for (int32 i = 0; i < manifold.pointCount; ++i)
 | 
			
		||||
        {
 | 
			
		||||
            m_debugDraw.DrawPoint(worldManifold.points[i], 4.0f, b2Color(0.9f, 0.3f, 0.3f));
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Keyboard(unsigned char key)
 | 
			
		||||
    {
 | 
			
		||||
        switch (key)
 | 
			
		||||
        {
 | 
			
		||||
        case 'a':
 | 
			
		||||
            m_positionB.x -= 0.1f;
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case 'd':
 | 
			
		||||
            m_positionB.x += 0.1f;
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case 's':
 | 
			
		||||
            m_positionB.y -= 0.1f;
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case 'w':
 | 
			
		||||
            m_positionB.y += 0.1f;
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case 'q':
 | 
			
		||||
            m_angleB += 0.1f * b2_pi;
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case 'e':
 | 
			
		||||
            m_angleB -= 0.1f * b2_pi;
 | 
			
		||||
            break;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        m_transformB.Set(m_positionB, m_angleB);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    b2PolygonShape m_polygonA;
 | 
			
		||||
    b2PolygonShape m_polygonB;
 | 
			
		||||
 | 
			
		||||
    b2Transform m_transformA;
 | 
			
		||||
    b2Transform m_transformB;
 | 
			
		||||
 | 
			
		||||
    b2Vec2 m_positionB;
 | 
			
		||||
    float32 m_angleB;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef POLYCOLLISION_H
 | 
			
		||||
#define POLYCOLLISION_H
 | 
			
		||||
 | 
			
		||||
class PolyCollision : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
    PolyCollision()
 | 
			
		||||
    {
 | 
			
		||||
        {
 | 
			
		||||
            m_polygonA.SetAsBox(0.2f, 0.4f);
 | 
			
		||||
            m_transformA.Set(b2Vec2(0.0f, 0.0f), 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            m_polygonB.SetAsBox(0.5f, 0.5f);
 | 
			
		||||
            m_positionB.Set(19.345284f, 1.5632932f);
 | 
			
		||||
            m_angleB = 1.9160721f;
 | 
			
		||||
            m_transformB.Set(m_positionB, m_angleB);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new PolyCollision;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Step(Settings* settings)
 | 
			
		||||
    {
 | 
			
		||||
        B2_NOT_USED(settings);
 | 
			
		||||
 | 
			
		||||
        b2Manifold manifold;
 | 
			
		||||
        b2CollidePolygons(&manifold, &m_polygonA, m_transformA, &m_polygonB, m_transformB);
 | 
			
		||||
 | 
			
		||||
        b2WorldManifold worldManifold;
 | 
			
		||||
        worldManifold.Initialize(&manifold, m_transformA, m_polygonA.m_radius, m_transformB, m_polygonB.m_radius);
 | 
			
		||||
 | 
			
		||||
        m_debugDraw.DrawString(5, m_textLine, "point count = %d", manifold.pointCount);
 | 
			
		||||
        m_textLine += 15;
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2Color color(0.9f, 0.9f, 0.9f);
 | 
			
		||||
            b2Vec2 v[b2_maxPolygonVertices];
 | 
			
		||||
            for (int32 i = 0; i < m_polygonA.m_vertexCount; ++i)
 | 
			
		||||
            {
 | 
			
		||||
                v[i] = b2Mul(m_transformA, m_polygonA.m_vertices[i]);
 | 
			
		||||
            }
 | 
			
		||||
            m_debugDraw.DrawPolygon(v, m_polygonA.m_vertexCount, color);
 | 
			
		||||
 | 
			
		||||
            for (int32 i = 0; i < m_polygonB.m_vertexCount; ++i)
 | 
			
		||||
            {
 | 
			
		||||
                v[i] = b2Mul(m_transformB, m_polygonB.m_vertices[i]);
 | 
			
		||||
            }
 | 
			
		||||
            m_debugDraw.DrawPolygon(v, m_polygonB.m_vertexCount, color);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        for (int32 i = 0; i < manifold.pointCount; ++i)
 | 
			
		||||
        {
 | 
			
		||||
            m_debugDraw.DrawPoint(worldManifold.points[i], 4.0f, b2Color(0.9f, 0.3f, 0.3f));
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Keyboard(unsigned char key)
 | 
			
		||||
    {
 | 
			
		||||
        switch (key)
 | 
			
		||||
        {
 | 
			
		||||
        case 'a':
 | 
			
		||||
            m_positionB.x -= 0.1f;
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case 'd':
 | 
			
		||||
            m_positionB.x += 0.1f;
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case 's':
 | 
			
		||||
            m_positionB.y -= 0.1f;
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case 'w':
 | 
			
		||||
            m_positionB.y += 0.1f;
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case 'q':
 | 
			
		||||
            m_angleB += 0.1f * b2_pi;
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case 'e':
 | 
			
		||||
            m_angleB -= 0.1f * b2_pi;
 | 
			
		||||
            break;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        m_transformB.Set(m_positionB, m_angleB);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    b2PolygonShape m_polygonA;
 | 
			
		||||
    b2PolygonShape m_polygonB;
 | 
			
		||||
 | 
			
		||||
    b2Transform m_transformA;
 | 
			
		||||
    b2Transform m_transformB;
 | 
			
		||||
 | 
			
		||||
    b2Vec2 m_positionB;
 | 
			
		||||
    float32 m_angleB;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -1,295 +1,295 @@
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef POLY_SHAPES_H
 | 
			
		||||
#define POLY_SHAPES_H
 | 
			
		||||
 | 
			
		||||
/// This tests stacking. It also shows how to use b2World::Query
 | 
			
		||||
/// and b2TestOverlap.
 | 
			
		||||
 | 
			
		||||
const int32 k_maxBodies = 256;
 | 
			
		||||
 | 
			
		||||
/// This callback is called by b2World::QueryAABB. We find all the fixtures
 | 
			
		||||
/// that overlap an AABB. Of those, we use b2TestOverlap to determine which fixtures
 | 
			
		||||
/// overlap a circle. Up to 4 overlapped fixtures will be highlighted with a yellow border.
 | 
			
		||||
class PolyShapesCallback : public b2QueryCallback
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
 | 
			
		||||
    enum
 | 
			
		||||
    {
 | 
			
		||||
        e_maxCount = 4
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    PolyShapesCallback()
 | 
			
		||||
    {
 | 
			
		||||
        m_count = 0;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void DrawFixture(b2Fixture* fixture)
 | 
			
		||||
    {
 | 
			
		||||
        b2Color color(0.95f, 0.95f, 0.6f);
 | 
			
		||||
        const b2Transform& xf = fixture->GetBody()->GetTransform();
 | 
			
		||||
 | 
			
		||||
        switch (fixture->GetType())
 | 
			
		||||
        {
 | 
			
		||||
        case b2Shape::e_circle:
 | 
			
		||||
            {
 | 
			
		||||
                b2CircleShape* circle = (b2CircleShape*)fixture->GetShape();
 | 
			
		||||
 | 
			
		||||
                b2Vec2 center = b2Mul(xf, circle->m_p);
 | 
			
		||||
                float32 radius = circle->m_radius;
 | 
			
		||||
 | 
			
		||||
                m_debugDraw->DrawCircle(center, radius, color);
 | 
			
		||||
            }
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case b2Shape::e_polygon:
 | 
			
		||||
            {
 | 
			
		||||
                b2PolygonShape* poly = (b2PolygonShape*)fixture->GetShape();
 | 
			
		||||
                int32 vertexCount = poly->m_vertexCount;
 | 
			
		||||
                b2Assert(vertexCount <= b2_maxPolygonVertices);
 | 
			
		||||
                b2Vec2 vertices[b2_maxPolygonVertices];
 | 
			
		||||
 | 
			
		||||
                for (int32 i = 0; i < vertexCount; ++i)
 | 
			
		||||
                {
 | 
			
		||||
                    vertices[i] = b2Mul(xf, poly->m_vertices[i]);
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                m_debugDraw->DrawPolygon(vertices, vertexCount, color);
 | 
			
		||||
            }
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        default:
 | 
			
		||||
            break;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /// Called for each fixture found in the query AABB.
 | 
			
		||||
    /// @return false to terminate the query.
 | 
			
		||||
    bool ReportFixture(b2Fixture* fixture)
 | 
			
		||||
    {
 | 
			
		||||
        if (m_count == e_maxCount)
 | 
			
		||||
        {
 | 
			
		||||
            return false;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        b2Body* body = fixture->GetBody();
 | 
			
		||||
        b2Shape* shape = fixture->GetShape();
 | 
			
		||||
 | 
			
		||||
        bool overlap = b2TestOverlap(shape, 0, &m_circle, 0, body->GetTransform(), m_transform);
 | 
			
		||||
 | 
			
		||||
        if (overlap)
 | 
			
		||||
        {
 | 
			
		||||
            DrawFixture(fixture);
 | 
			
		||||
            ++m_count;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        return true;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    b2CircleShape m_circle;
 | 
			
		||||
    b2Transform m_transform;
 | 
			
		||||
    b2Draw* m_debugDraw;
 | 
			
		||||
    int32 m_count;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
class PolyShapes : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
    PolyShapes()
 | 
			
		||||
    {
 | 
			
		||||
        // Ground body
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            b2Body* ground = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2EdgeShape shape;
 | 
			
		||||
            shape.Set(b2Vec2(-40.0f, 0.0f), b2Vec2(40.0f, 0.0f));
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2Vec2 vertices[3];
 | 
			
		||||
            vertices[0].Set(-0.5f, 0.0f);
 | 
			
		||||
            vertices[1].Set(0.5f, 0.0f);
 | 
			
		||||
            vertices[2].Set(0.0f, 1.5f);
 | 
			
		||||
            m_polygons[0].Set(vertices, 3);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2Vec2 vertices[3];
 | 
			
		||||
            vertices[0].Set(-0.1f, 0.0f);
 | 
			
		||||
            vertices[1].Set(0.1f, 0.0f);
 | 
			
		||||
            vertices[2].Set(0.0f, 1.5f);
 | 
			
		||||
            m_polygons[1].Set(vertices, 3);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            float32 w = 1.0f;
 | 
			
		||||
            float32 b = w / (2.0f + b2Sqrt(2.0f));
 | 
			
		||||
            float32 s = b2Sqrt(2.0f) * b;
 | 
			
		||||
 | 
			
		||||
            b2Vec2 vertices[8];
 | 
			
		||||
            vertices[0].Set(0.5f * s, 0.0f);
 | 
			
		||||
            vertices[1].Set(0.5f * w, b);
 | 
			
		||||
            vertices[2].Set(0.5f * w, b + s);
 | 
			
		||||
            vertices[3].Set(0.5f * s, w);
 | 
			
		||||
            vertices[4].Set(-0.5f * s, w);
 | 
			
		||||
            vertices[5].Set(-0.5f * w, b + s);
 | 
			
		||||
            vertices[6].Set(-0.5f * w, b);
 | 
			
		||||
            vertices[7].Set(-0.5f * s, 0.0f);
 | 
			
		||||
 | 
			
		||||
            m_polygons[2].Set(vertices, 8);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            m_polygons[3].SetAsBox(0.5f, 0.5f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            m_circle.m_radius = 0.5f;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        m_bodyIndex = 0;
 | 
			
		||||
        memset(m_bodies, 0, sizeof(m_bodies));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Create(int32 index)
 | 
			
		||||
    {
 | 
			
		||||
        if (m_bodies[m_bodyIndex] != NULL)
 | 
			
		||||
        {
 | 
			
		||||
            m_world->DestroyBody(m_bodies[m_bodyIndex]);
 | 
			
		||||
            m_bodies[m_bodyIndex] = NULL;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        b2BodyDef bd;
 | 
			
		||||
        bd.type = b2_dynamicBody;
 | 
			
		||||
 | 
			
		||||
        float32 x = RandomFloat(-2.0f, 2.0f);
 | 
			
		||||
        bd.position.Set(x, 10.0f);
 | 
			
		||||
        bd.angle = RandomFloat(-b2_pi, b2_pi);
 | 
			
		||||
 | 
			
		||||
        if (index == 4)
 | 
			
		||||
        {
 | 
			
		||||
            bd.angularDamping = 0.02f;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        m_bodies[m_bodyIndex] = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
        if (index < 4)
 | 
			
		||||
        {
 | 
			
		||||
            b2FixtureDef fd;
 | 
			
		||||
            fd.shape = m_polygons + index;
 | 
			
		||||
            fd.density = 1.0f;
 | 
			
		||||
            fd.friction = 0.3f;
 | 
			
		||||
            m_bodies[m_bodyIndex]->CreateFixture(&fd);
 | 
			
		||||
        }
 | 
			
		||||
        else
 | 
			
		||||
        {
 | 
			
		||||
            b2FixtureDef fd;
 | 
			
		||||
            fd.shape = &m_circle;
 | 
			
		||||
            fd.density = 1.0f;
 | 
			
		||||
            fd.friction = 0.3f;
 | 
			
		||||
 | 
			
		||||
            m_bodies[m_bodyIndex]->CreateFixture(&fd);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        m_bodyIndex = (m_bodyIndex + 1) % k_maxBodies;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void DestroyBody()
 | 
			
		||||
    {
 | 
			
		||||
        for (int32 i = 0; i < k_maxBodies; ++i)
 | 
			
		||||
        {
 | 
			
		||||
            if (m_bodies[i] != NULL)
 | 
			
		||||
            {
 | 
			
		||||
                m_world->DestroyBody(m_bodies[i]);
 | 
			
		||||
                m_bodies[i] = NULL;
 | 
			
		||||
                return;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Keyboard(unsigned char key)
 | 
			
		||||
    {
 | 
			
		||||
        switch (key)
 | 
			
		||||
        {
 | 
			
		||||
        case '1':
 | 
			
		||||
        case '2':
 | 
			
		||||
        case '3':
 | 
			
		||||
        case '4':
 | 
			
		||||
        case '5':
 | 
			
		||||
            Create(key - '1');
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case 'a':
 | 
			
		||||
            for (int32 i = 0; i < k_maxBodies; i += 2)
 | 
			
		||||
            {
 | 
			
		||||
                if (m_bodies[i])
 | 
			
		||||
                {
 | 
			
		||||
                    bool active = m_bodies[i]->IsActive();
 | 
			
		||||
                    m_bodies[i]->SetActive(!active);
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case 'd':
 | 
			
		||||
            DestroyBody();
 | 
			
		||||
            break;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Step(Settings* settings)
 | 
			
		||||
    {
 | 
			
		||||
        Test::Step(settings);
 | 
			
		||||
 | 
			
		||||
        PolyShapesCallback callback;
 | 
			
		||||
        callback.m_circle.m_radius = 2.0f;
 | 
			
		||||
        callback.m_circle.m_p.Set(0.0f, 1.1f);
 | 
			
		||||
        callback.m_transform.SetIdentity();
 | 
			
		||||
        callback.m_debugDraw = &m_debugDraw;
 | 
			
		||||
 | 
			
		||||
        b2AABB aabb;
 | 
			
		||||
        callback.m_circle.ComputeAABB(&aabb, callback.m_transform, 0);
 | 
			
		||||
 | 
			
		||||
        m_world->QueryAABB(&callback, aabb);
 | 
			
		||||
 | 
			
		||||
        b2Color color(0.4f, 0.7f, 0.8f);
 | 
			
		||||
        m_debugDraw.DrawCircle(callback.m_circle.m_p, callback.m_circle.m_radius, color);
 | 
			
		||||
 | 
			
		||||
        m_debugDraw.DrawString(5, m_textLine, "Press 1-5 to drop stuff");
 | 
			
		||||
        m_textLine += 15;
 | 
			
		||||
        m_debugDraw.DrawString(5, m_textLine, "Press 'a' to (de)activate some bodies");
 | 
			
		||||
        m_textLine += 15;
 | 
			
		||||
        m_debugDraw.DrawString(5, m_textLine, "Press 'd' to destroy a body");
 | 
			
		||||
        m_textLine += 15;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new PolyShapes;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    int32 m_bodyIndex;
 | 
			
		||||
    b2Body* m_bodies[k_maxBodies];
 | 
			
		||||
    b2PolygonShape m_polygons[4];
 | 
			
		||||
    b2CircleShape m_circle;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef POLY_SHAPES_H
 | 
			
		||||
#define POLY_SHAPES_H
 | 
			
		||||
 | 
			
		||||
/// This tests stacking. It also shows how to use b2World::Query
 | 
			
		||||
/// and b2TestOverlap.
 | 
			
		||||
 | 
			
		||||
const int32 k_maxBodies = 256;
 | 
			
		||||
 | 
			
		||||
/// This callback is called by b2World::QueryAABB. We find all the fixtures
 | 
			
		||||
/// that overlap an AABB. Of those, we use b2TestOverlap to determine which fixtures
 | 
			
		||||
/// overlap a circle. Up to 4 overlapped fixtures will be highlighted with a yellow border.
 | 
			
		||||
class PolyShapesCallback : public b2QueryCallback
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
 | 
			
		||||
    enum
 | 
			
		||||
    {
 | 
			
		||||
        e_maxCount = 4
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    PolyShapesCallback()
 | 
			
		||||
    {
 | 
			
		||||
        m_count = 0;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void DrawFixture(b2Fixture* fixture)
 | 
			
		||||
    {
 | 
			
		||||
        b2Color color(0.95f, 0.95f, 0.6f);
 | 
			
		||||
        const b2Transform& xf = fixture->GetBody()->GetTransform();
 | 
			
		||||
 | 
			
		||||
        switch (fixture->GetType())
 | 
			
		||||
        {
 | 
			
		||||
        case b2Shape::e_circle:
 | 
			
		||||
            {
 | 
			
		||||
                b2CircleShape* circle = (b2CircleShape*)fixture->GetShape();
 | 
			
		||||
 | 
			
		||||
                b2Vec2 center = b2Mul(xf, circle->m_p);
 | 
			
		||||
                float32 radius = circle->m_radius;
 | 
			
		||||
 | 
			
		||||
                m_debugDraw->DrawCircle(center, radius, color);
 | 
			
		||||
            }
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case b2Shape::e_polygon:
 | 
			
		||||
            {
 | 
			
		||||
                b2PolygonShape* poly = (b2PolygonShape*)fixture->GetShape();
 | 
			
		||||
                int32 vertexCount = poly->m_vertexCount;
 | 
			
		||||
                b2Assert(vertexCount <= b2_maxPolygonVertices);
 | 
			
		||||
                b2Vec2 vertices[b2_maxPolygonVertices];
 | 
			
		||||
 | 
			
		||||
                for (int32 i = 0; i < vertexCount; ++i)
 | 
			
		||||
                {
 | 
			
		||||
                    vertices[i] = b2Mul(xf, poly->m_vertices[i]);
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                m_debugDraw->DrawPolygon(vertices, vertexCount, color);
 | 
			
		||||
            }
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        default:
 | 
			
		||||
            break;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /// Called for each fixture found in the query AABB.
 | 
			
		||||
    /// @return false to terminate the query.
 | 
			
		||||
    bool ReportFixture(b2Fixture* fixture)
 | 
			
		||||
    {
 | 
			
		||||
        if (m_count == e_maxCount)
 | 
			
		||||
        {
 | 
			
		||||
            return false;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        b2Body* body = fixture->GetBody();
 | 
			
		||||
        b2Shape* shape = fixture->GetShape();
 | 
			
		||||
 | 
			
		||||
        bool overlap = b2TestOverlap(shape, 0, &m_circle, 0, body->GetTransform(), m_transform);
 | 
			
		||||
 | 
			
		||||
        if (overlap)
 | 
			
		||||
        {
 | 
			
		||||
            DrawFixture(fixture);
 | 
			
		||||
            ++m_count;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        return true;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    b2CircleShape m_circle;
 | 
			
		||||
    b2Transform m_transform;
 | 
			
		||||
    b2Draw* m_debugDraw;
 | 
			
		||||
    int32 m_count;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
class PolyShapes : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
    PolyShapes()
 | 
			
		||||
    {
 | 
			
		||||
        // Ground body
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            b2Body* ground = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2EdgeShape shape;
 | 
			
		||||
            shape.Set(b2Vec2(-40.0f, 0.0f), b2Vec2(40.0f, 0.0f));
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2Vec2 vertices[3];
 | 
			
		||||
            vertices[0].Set(-0.5f, 0.0f);
 | 
			
		||||
            vertices[1].Set(0.5f, 0.0f);
 | 
			
		||||
            vertices[2].Set(0.0f, 1.5f);
 | 
			
		||||
            m_polygons[0].Set(vertices, 3);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2Vec2 vertices[3];
 | 
			
		||||
            vertices[0].Set(-0.1f, 0.0f);
 | 
			
		||||
            vertices[1].Set(0.1f, 0.0f);
 | 
			
		||||
            vertices[2].Set(0.0f, 1.5f);
 | 
			
		||||
            m_polygons[1].Set(vertices, 3);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            float32 w = 1.0f;
 | 
			
		||||
            float32 b = w / (2.0f + b2Sqrt(2.0f));
 | 
			
		||||
            float32 s = b2Sqrt(2.0f) * b;
 | 
			
		||||
 | 
			
		||||
            b2Vec2 vertices[8];
 | 
			
		||||
            vertices[0].Set(0.5f * s, 0.0f);
 | 
			
		||||
            vertices[1].Set(0.5f * w, b);
 | 
			
		||||
            vertices[2].Set(0.5f * w, b + s);
 | 
			
		||||
            vertices[3].Set(0.5f * s, w);
 | 
			
		||||
            vertices[4].Set(-0.5f * s, w);
 | 
			
		||||
            vertices[5].Set(-0.5f * w, b + s);
 | 
			
		||||
            vertices[6].Set(-0.5f * w, b);
 | 
			
		||||
            vertices[7].Set(-0.5f * s, 0.0f);
 | 
			
		||||
 | 
			
		||||
            m_polygons[2].Set(vertices, 8);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            m_polygons[3].SetAsBox(0.5f, 0.5f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            m_circle.m_radius = 0.5f;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        m_bodyIndex = 0;
 | 
			
		||||
        memset(m_bodies, 0, sizeof(m_bodies));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Create(int32 index)
 | 
			
		||||
    {
 | 
			
		||||
        if (m_bodies[m_bodyIndex] != NULL)
 | 
			
		||||
        {
 | 
			
		||||
            m_world->DestroyBody(m_bodies[m_bodyIndex]);
 | 
			
		||||
            m_bodies[m_bodyIndex] = NULL;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        b2BodyDef bd;
 | 
			
		||||
        bd.type = b2_dynamicBody;
 | 
			
		||||
 | 
			
		||||
        float32 x = RandomFloat(-2.0f, 2.0f);
 | 
			
		||||
        bd.position.Set(x, 10.0f);
 | 
			
		||||
        bd.angle = RandomFloat(-b2_pi, b2_pi);
 | 
			
		||||
 | 
			
		||||
        if (index == 4)
 | 
			
		||||
        {
 | 
			
		||||
            bd.angularDamping = 0.02f;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        m_bodies[m_bodyIndex] = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
        if (index < 4)
 | 
			
		||||
        {
 | 
			
		||||
            b2FixtureDef fd;
 | 
			
		||||
            fd.shape = m_polygons + index;
 | 
			
		||||
            fd.density = 1.0f;
 | 
			
		||||
            fd.friction = 0.3f;
 | 
			
		||||
            m_bodies[m_bodyIndex]->CreateFixture(&fd);
 | 
			
		||||
        }
 | 
			
		||||
        else
 | 
			
		||||
        {
 | 
			
		||||
            b2FixtureDef fd;
 | 
			
		||||
            fd.shape = &m_circle;
 | 
			
		||||
            fd.density = 1.0f;
 | 
			
		||||
            fd.friction = 0.3f;
 | 
			
		||||
 | 
			
		||||
            m_bodies[m_bodyIndex]->CreateFixture(&fd);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        m_bodyIndex = (m_bodyIndex + 1) % k_maxBodies;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void DestroyBody()
 | 
			
		||||
    {
 | 
			
		||||
        for (int32 i = 0; i < k_maxBodies; ++i)
 | 
			
		||||
        {
 | 
			
		||||
            if (m_bodies[i] != NULL)
 | 
			
		||||
            {
 | 
			
		||||
                m_world->DestroyBody(m_bodies[i]);
 | 
			
		||||
                m_bodies[i] = NULL;
 | 
			
		||||
                return;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Keyboard(unsigned char key)
 | 
			
		||||
    {
 | 
			
		||||
        switch (key)
 | 
			
		||||
        {
 | 
			
		||||
        case '1':
 | 
			
		||||
        case '2':
 | 
			
		||||
        case '3':
 | 
			
		||||
        case '4':
 | 
			
		||||
        case '5':
 | 
			
		||||
            Create(key - '1');
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case 'a':
 | 
			
		||||
            for (int32 i = 0; i < k_maxBodies; i += 2)
 | 
			
		||||
            {
 | 
			
		||||
                if (m_bodies[i])
 | 
			
		||||
                {
 | 
			
		||||
                    bool active = m_bodies[i]->IsActive();
 | 
			
		||||
                    m_bodies[i]->SetActive(!active);
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case 'd':
 | 
			
		||||
            DestroyBody();
 | 
			
		||||
            break;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Step(Settings* settings)
 | 
			
		||||
    {
 | 
			
		||||
        Test::Step(settings);
 | 
			
		||||
 | 
			
		||||
        PolyShapesCallback callback;
 | 
			
		||||
        callback.m_circle.m_radius = 2.0f;
 | 
			
		||||
        callback.m_circle.m_p.Set(0.0f, 1.1f);
 | 
			
		||||
        callback.m_transform.SetIdentity();
 | 
			
		||||
        callback.m_debugDraw = &m_debugDraw;
 | 
			
		||||
 | 
			
		||||
        b2AABB aabb;
 | 
			
		||||
        callback.m_circle.ComputeAABB(&aabb, callback.m_transform, 0);
 | 
			
		||||
 | 
			
		||||
        m_world->QueryAABB(&callback, aabb);
 | 
			
		||||
 | 
			
		||||
        b2Color color(0.4f, 0.7f, 0.8f);
 | 
			
		||||
        m_debugDraw.DrawCircle(callback.m_circle.m_p, callback.m_circle.m_radius, color);
 | 
			
		||||
 | 
			
		||||
        m_debugDraw.DrawString(5, m_textLine, "Press 1-5 to drop stuff");
 | 
			
		||||
        m_textLine += 15;
 | 
			
		||||
        m_debugDraw.DrawString(5, m_textLine, "Press 'a' to (de)activate some bodies");
 | 
			
		||||
        m_textLine += 15;
 | 
			
		||||
        m_debugDraw.DrawString(5, m_textLine, "Press 'd' to destroy a body");
 | 
			
		||||
        m_textLine += 15;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new PolyShapes;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    int32 m_bodyIndex;
 | 
			
		||||
    b2Body* m_bodies[k_maxBodies];
 | 
			
		||||
    b2PolygonShape m_polygons[4];
 | 
			
		||||
    b2CircleShape m_circle;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -1,107 +1,107 @@
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef PRISMATIC_H
 | 
			
		||||
#define PRISMATIC_H
 | 
			
		||||
 | 
			
		||||
// The motor in this test gets smoother with higher velocity iterations.
 | 
			
		||||
class Prismatic : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
    Prismatic()
 | 
			
		||||
    {
 | 
			
		||||
        b2Body* ground = NULL;
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            ground = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2EdgeShape shape;
 | 
			
		||||
            shape.Set(b2Vec2(-40.0f, 0.0f), b2Vec2(40.0f, 0.0f));
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(2.0f, 0.5f);
 | 
			
		||||
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
            bd.position.Set(-10.0f, 10.0f);
 | 
			
		||||
            bd.angle = 0.5f * b2_pi;
 | 
			
		||||
            bd.allowSleep = false;
 | 
			
		||||
            b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
            body->CreateFixture(&shape, 5.0f);
 | 
			
		||||
 | 
			
		||||
            b2PrismaticJointDef pjd;
 | 
			
		||||
 | 
			
		||||
            // Bouncy limit
 | 
			
		||||
            b2Vec2 axis(2.0f, 1.0f);
 | 
			
		||||
            axis.Normalize();
 | 
			
		||||
            pjd.Initialize(ground, body, b2Vec2(0.0f, 0.0f), axis);
 | 
			
		||||
 | 
			
		||||
            // Non-bouncy limit
 | 
			
		||||
            //pjd.Initialize(ground, body, b2Vec2(-10.0f, 10.0f), b2Vec2(1.0f, 0.0f));
 | 
			
		||||
 | 
			
		||||
            pjd.motorSpeed = 10.0f;
 | 
			
		||||
            pjd.maxMotorForce = 10000.0f;
 | 
			
		||||
            pjd.enableMotor = true;
 | 
			
		||||
            pjd.lowerTranslation = 0.0f;
 | 
			
		||||
            pjd.upperTranslation = 20.0f;
 | 
			
		||||
            pjd.enableLimit = true;
 | 
			
		||||
 | 
			
		||||
            m_joint = (b2PrismaticJoint*)m_world->CreateJoint(&pjd);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Keyboard(unsigned char key)
 | 
			
		||||
    {
 | 
			
		||||
        switch (key)
 | 
			
		||||
        {
 | 
			
		||||
        case 'l':
 | 
			
		||||
            m_joint->EnableLimit(!m_joint->IsLimitEnabled());
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case 'm':
 | 
			
		||||
            m_joint->EnableMotor(!m_joint->IsMotorEnabled());
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case 's':
 | 
			
		||||
            m_joint->SetMotorSpeed(-m_joint->GetMotorSpeed());
 | 
			
		||||
            break;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Step(Settings* settings)
 | 
			
		||||
    {
 | 
			
		||||
        Test::Step(settings);
 | 
			
		||||
        m_debugDraw.DrawString(5, m_textLine, "Keys: (l) limits, (m) motors, (s) speed");
 | 
			
		||||
        m_textLine += 15;
 | 
			
		||||
        float32 force = m_joint->GetMotorForce(settings->hz);
 | 
			
		||||
        m_debugDraw.DrawString(5, m_textLine, "Motor Force = %4.0f", (float) force);
 | 
			
		||||
        m_textLine += 15;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new Prismatic;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    b2PrismaticJoint* m_joint;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef PRISMATIC_H
 | 
			
		||||
#define PRISMATIC_H
 | 
			
		||||
 | 
			
		||||
// The motor in this test gets smoother with higher velocity iterations.
 | 
			
		||||
class Prismatic : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
    Prismatic()
 | 
			
		||||
    {
 | 
			
		||||
        b2Body* ground = NULL;
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            ground = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2EdgeShape shape;
 | 
			
		||||
            shape.Set(b2Vec2(-40.0f, 0.0f), b2Vec2(40.0f, 0.0f));
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(2.0f, 0.5f);
 | 
			
		||||
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
            bd.position.Set(-10.0f, 10.0f);
 | 
			
		||||
            bd.angle = 0.5f * b2_pi;
 | 
			
		||||
            bd.allowSleep = false;
 | 
			
		||||
            b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
            body->CreateFixture(&shape, 5.0f);
 | 
			
		||||
 | 
			
		||||
            b2PrismaticJointDef pjd;
 | 
			
		||||
 | 
			
		||||
            // Bouncy limit
 | 
			
		||||
            b2Vec2 axis(2.0f, 1.0f);
 | 
			
		||||
            axis.Normalize();
 | 
			
		||||
            pjd.Initialize(ground, body, b2Vec2(0.0f, 0.0f), axis);
 | 
			
		||||
 | 
			
		||||
            // Non-bouncy limit
 | 
			
		||||
            //pjd.Initialize(ground, body, b2Vec2(-10.0f, 10.0f), b2Vec2(1.0f, 0.0f));
 | 
			
		||||
 | 
			
		||||
            pjd.motorSpeed = 10.0f;
 | 
			
		||||
            pjd.maxMotorForce = 10000.0f;
 | 
			
		||||
            pjd.enableMotor = true;
 | 
			
		||||
            pjd.lowerTranslation = 0.0f;
 | 
			
		||||
            pjd.upperTranslation = 20.0f;
 | 
			
		||||
            pjd.enableLimit = true;
 | 
			
		||||
 | 
			
		||||
            m_joint = (b2PrismaticJoint*)m_world->CreateJoint(&pjd);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Keyboard(unsigned char key)
 | 
			
		||||
    {
 | 
			
		||||
        switch (key)
 | 
			
		||||
        {
 | 
			
		||||
        case 'l':
 | 
			
		||||
            m_joint->EnableLimit(!m_joint->IsLimitEnabled());
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case 'm':
 | 
			
		||||
            m_joint->EnableMotor(!m_joint->IsMotorEnabled());
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case 's':
 | 
			
		||||
            m_joint->SetMotorSpeed(-m_joint->GetMotorSpeed());
 | 
			
		||||
            break;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Step(Settings* settings)
 | 
			
		||||
    {
 | 
			
		||||
        Test::Step(settings);
 | 
			
		||||
        m_debugDraw.DrawString(5, m_textLine, "Keys: (l) limits, (m) motors, (s) speed");
 | 
			
		||||
        m_textLine += 15;
 | 
			
		||||
        float32 force = m_joint->GetMotorForce(settings->hz);
 | 
			
		||||
        m_debugDraw.DrawString(5, m_textLine, "Motor Force = %4.0f", (float) force);
 | 
			
		||||
        m_textLine += 15;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new Prismatic;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    b2PrismaticJoint* m_joint;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -1,106 +1,106 @@
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2007-2009 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef PULLEYS_H
 | 
			
		||||
#define PULLEYS_H
 | 
			
		||||
 | 
			
		||||
class Pulleys : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
    Pulleys()
 | 
			
		||||
    {
 | 
			
		||||
        float32 y = 16.0f;
 | 
			
		||||
        float32 L = 12.0f;
 | 
			
		||||
        float32 a = 1.0f;
 | 
			
		||||
        float32 b = 2.0f;
 | 
			
		||||
 | 
			
		||||
        b2Body* ground = NULL;
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            ground = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2EdgeShape edge;
 | 
			
		||||
            edge.Set(b2Vec2(-40.0f, 0.0f), b2Vec2(40.0f, 0.0f));
 | 
			
		||||
            //ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
 | 
			
		||||
            b2CircleShape circle;
 | 
			
		||||
            circle.m_radius = 2.0f;
 | 
			
		||||
 | 
			
		||||
            circle.m_p.Set(-10.0f, y + b + L);
 | 
			
		||||
            ground->CreateFixture(&circle, 0.0f);
 | 
			
		||||
 | 
			
		||||
            circle.m_p.Set(10.0f, y + b + L);
 | 
			
		||||
            ground->CreateFixture(&circle, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(a, b);
 | 
			
		||||
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
 | 
			
		||||
            //bd.fixedRotation = true;
 | 
			
		||||
            bd.position.Set(-10.0f, y);
 | 
			
		||||
            b2Body* body1 = m_world->CreateBody(&bd);
 | 
			
		||||
            body1->CreateFixture(&shape, 5.0f);
 | 
			
		||||
 | 
			
		||||
            bd.position.Set(10.0f, y);
 | 
			
		||||
            b2Body* body2 = m_world->CreateBody(&bd);
 | 
			
		||||
            body2->CreateFixture(&shape, 5.0f);
 | 
			
		||||
 | 
			
		||||
            b2PulleyJointDef pulleyDef;
 | 
			
		||||
            b2Vec2 anchor1(-10.0f, y + b);
 | 
			
		||||
            b2Vec2 anchor2(10.0f, y + b);
 | 
			
		||||
            b2Vec2 groundAnchor1(-10.0f, y + b + L);
 | 
			
		||||
            b2Vec2 groundAnchor2(10.0f, y + b + L);
 | 
			
		||||
            pulleyDef.Initialize(body1, body2, groundAnchor1, groundAnchor2, anchor1, anchor2, 1.5f);
 | 
			
		||||
 | 
			
		||||
            m_joint1 = (b2PulleyJoint*)m_world->CreateJoint(&pulleyDef);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Keyboard(unsigned char key)
 | 
			
		||||
    {
 | 
			
		||||
        switch (key)
 | 
			
		||||
        {
 | 
			
		||||
        case 0:
 | 
			
		||||
            break;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Step(Settings* settings)
 | 
			
		||||
    {
 | 
			
		||||
        Test::Step(settings);
 | 
			
		||||
 | 
			
		||||
        float32 ratio = m_joint1->GetRatio();
 | 
			
		||||
        float32 L = m_joint1->GetLengthA() + ratio * m_joint1->GetLengthB();
 | 
			
		||||
        m_debugDraw.DrawString(5, m_textLine, "L1 + %4.2f * L2 = %4.2f", (float) ratio, (float) L);
 | 
			
		||||
        m_textLine += 15;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new Pulleys;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    b2PulleyJoint* m_joint1;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2007-2009 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef PULLEYS_H
 | 
			
		||||
#define PULLEYS_H
 | 
			
		||||
 | 
			
		||||
class Pulleys : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
    Pulleys()
 | 
			
		||||
    {
 | 
			
		||||
        float32 y = 16.0f;
 | 
			
		||||
        float32 L = 12.0f;
 | 
			
		||||
        float32 a = 1.0f;
 | 
			
		||||
        float32 b = 2.0f;
 | 
			
		||||
 | 
			
		||||
        b2Body* ground = NULL;
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            ground = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2EdgeShape edge;
 | 
			
		||||
            edge.Set(b2Vec2(-40.0f, 0.0f), b2Vec2(40.0f, 0.0f));
 | 
			
		||||
            //ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
 | 
			
		||||
            b2CircleShape circle;
 | 
			
		||||
            circle.m_radius = 2.0f;
 | 
			
		||||
 | 
			
		||||
            circle.m_p.Set(-10.0f, y + b + L);
 | 
			
		||||
            ground->CreateFixture(&circle, 0.0f);
 | 
			
		||||
 | 
			
		||||
            circle.m_p.Set(10.0f, y + b + L);
 | 
			
		||||
            ground->CreateFixture(&circle, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(a, b);
 | 
			
		||||
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
 | 
			
		||||
            //bd.fixedRotation = true;
 | 
			
		||||
            bd.position.Set(-10.0f, y);
 | 
			
		||||
            b2Body* body1 = m_world->CreateBody(&bd);
 | 
			
		||||
            body1->CreateFixture(&shape, 5.0f);
 | 
			
		||||
 | 
			
		||||
            bd.position.Set(10.0f, y);
 | 
			
		||||
            b2Body* body2 = m_world->CreateBody(&bd);
 | 
			
		||||
            body2->CreateFixture(&shape, 5.0f);
 | 
			
		||||
 | 
			
		||||
            b2PulleyJointDef pulleyDef;
 | 
			
		||||
            b2Vec2 anchor1(-10.0f, y + b);
 | 
			
		||||
            b2Vec2 anchor2(10.0f, y + b);
 | 
			
		||||
            b2Vec2 groundAnchor1(-10.0f, y + b + L);
 | 
			
		||||
            b2Vec2 groundAnchor2(10.0f, y + b + L);
 | 
			
		||||
            pulleyDef.Initialize(body1, body2, groundAnchor1, groundAnchor2, anchor1, anchor2, 1.5f);
 | 
			
		||||
 | 
			
		||||
            m_joint1 = (b2PulleyJoint*)m_world->CreateJoint(&pulleyDef);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Keyboard(unsigned char key)
 | 
			
		||||
    {
 | 
			
		||||
        switch (key)
 | 
			
		||||
        {
 | 
			
		||||
        case 0:
 | 
			
		||||
            break;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Step(Settings* settings)
 | 
			
		||||
    {
 | 
			
		||||
        Test::Step(settings);
 | 
			
		||||
 | 
			
		||||
        float32 ratio = m_joint1->GetRatio();
 | 
			
		||||
        float32 L = m_joint1->GetLengthA() + ratio * m_joint1->GetLengthB();
 | 
			
		||||
        m_debugDraw.DrawString(5, m_textLine, "L1 + %4.2f * L2 = %4.2f", (float) ratio, (float) L);
 | 
			
		||||
        m_textLine += 15;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new Pulleys;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    b2PulleyJoint* m_joint1;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -1,89 +1,89 @@
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef PYRAMID_H
 | 
			
		||||
#define PYRAMID_H
 | 
			
		||||
 | 
			
		||||
class Pyramid : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
    enum
 | 
			
		||||
    {
 | 
			
		||||
        e_count = 20
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    Pyramid()
 | 
			
		||||
    {
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            b2Body* ground = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2EdgeShape shape;
 | 
			
		||||
            shape.Set(b2Vec2(-40.0f, 0.0f), b2Vec2(40.0f, 0.0f));
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            float32 a = 0.5f;
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(a, a);
 | 
			
		||||
 | 
			
		||||
            b2Vec2 x(-7.0f, 0.75f);
 | 
			
		||||
            b2Vec2 y;
 | 
			
		||||
            b2Vec2 deltaX(0.5625f, 1.25f);
 | 
			
		||||
            b2Vec2 deltaY(1.125f, 0.0f);
 | 
			
		||||
 | 
			
		||||
            for (int32 i = 0; i < e_count; ++i)
 | 
			
		||||
            {
 | 
			
		||||
                y = x;
 | 
			
		||||
 | 
			
		||||
                for (int32 j = i; j < e_count; ++j)
 | 
			
		||||
                {
 | 
			
		||||
                    b2BodyDef bd;
 | 
			
		||||
                    bd.type = b2_dynamicBody;
 | 
			
		||||
                    bd.position = y;
 | 
			
		||||
                    b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
                    body->CreateFixture(&shape, 5.0f);
 | 
			
		||||
 | 
			
		||||
                    y += deltaY;
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                x += deltaX;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Step(Settings* settings)
 | 
			
		||||
    {
 | 
			
		||||
        Test::Step(settings);
 | 
			
		||||
 | 
			
		||||
        //b2DynamicTree* tree = &m_world->m_contactManager.m_broadPhase.m_tree;
 | 
			
		||||
 | 
			
		||||
        //if (m_stepCount == 400)
 | 
			
		||||
        //{
 | 
			
		||||
        //  tree->RebuildBottomUp();
 | 
			
		||||
        //}
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new Pyramid;
 | 
			
		||||
    }
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef PYRAMID_H
 | 
			
		||||
#define PYRAMID_H
 | 
			
		||||
 | 
			
		||||
class Pyramid : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
    enum
 | 
			
		||||
    {
 | 
			
		||||
        e_count = 20
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    Pyramid()
 | 
			
		||||
    {
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            b2Body* ground = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2EdgeShape shape;
 | 
			
		||||
            shape.Set(b2Vec2(-40.0f, 0.0f), b2Vec2(40.0f, 0.0f));
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            float32 a = 0.5f;
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(a, a);
 | 
			
		||||
 | 
			
		||||
            b2Vec2 x(-7.0f, 0.75f);
 | 
			
		||||
            b2Vec2 y;
 | 
			
		||||
            b2Vec2 deltaX(0.5625f, 1.25f);
 | 
			
		||||
            b2Vec2 deltaY(1.125f, 0.0f);
 | 
			
		||||
 | 
			
		||||
            for (int32 i = 0; i < e_count; ++i)
 | 
			
		||||
            {
 | 
			
		||||
                y = x;
 | 
			
		||||
 | 
			
		||||
                for (int32 j = i; j < e_count; ++j)
 | 
			
		||||
                {
 | 
			
		||||
                    b2BodyDef bd;
 | 
			
		||||
                    bd.type = b2_dynamicBody;
 | 
			
		||||
                    bd.position = y;
 | 
			
		||||
                    b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
                    body->CreateFixture(&shape, 5.0f);
 | 
			
		||||
 | 
			
		||||
                    y += deltaY;
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                x += deltaX;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Step(Settings* settings)
 | 
			
		||||
    {
 | 
			
		||||
        Test::Step(settings);
 | 
			
		||||
 | 
			
		||||
        //b2DynamicTree* tree = &m_world->m_contactManager.m_broadPhase.m_tree;
 | 
			
		||||
 | 
			
		||||
        //if (m_stepCount == 400)
 | 
			
		||||
        //{
 | 
			
		||||
        //  tree->RebuildBottomUp();
 | 
			
		||||
        //}
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new Pyramid;
 | 
			
		||||
    }
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -1,440 +1,440 @@
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef RAY_CAST_H
 | 
			
		||||
#define RAY_CAST_H
 | 
			
		||||
 | 
			
		||||
// This test demonstrates how to use the world ray-cast feature.
 | 
			
		||||
// NOTE: we are intentionally filtering one of the polygons, therefore
 | 
			
		||||
// the ray will always miss one type of polygon.
 | 
			
		||||
 | 
			
		||||
// This callback finds the closest hit. Polygon 0 is filtered.
 | 
			
		||||
class RayCastClosestCallback : public b2RayCastCallback
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
    RayCastClosestCallback()
 | 
			
		||||
    {
 | 
			
		||||
        m_hit = false;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    float32 ReportFixture(  b2Fixture* fixture, const b2Vec2& point,
 | 
			
		||||
        const b2Vec2& normal, float32 fraction)
 | 
			
		||||
    {
 | 
			
		||||
        b2Body* body = fixture->GetBody();
 | 
			
		||||
        void* userData = body->GetUserData();
 | 
			
		||||
        if (userData)
 | 
			
		||||
        {
 | 
			
		||||
            int32 index = *(int32*)userData;
 | 
			
		||||
            if (index == 0)
 | 
			
		||||
            {
 | 
			
		||||
                // filter
 | 
			
		||||
                return -1.0f;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        m_hit = true;
 | 
			
		||||
        m_point = point;
 | 
			
		||||
        m_normal = normal;
 | 
			
		||||
        return fraction;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    bool m_hit;
 | 
			
		||||
    b2Vec2 m_point;
 | 
			
		||||
    b2Vec2 m_normal;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
// This callback finds any hit. Polygon 0 is filtered.
 | 
			
		||||
class RayCastAnyCallback : public b2RayCastCallback
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
    RayCastAnyCallback()
 | 
			
		||||
    {
 | 
			
		||||
        m_hit = false;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    float32 ReportFixture(  b2Fixture* fixture, const b2Vec2& point,
 | 
			
		||||
        const b2Vec2& normal, float32 fraction)
 | 
			
		||||
    {
 | 
			
		||||
        b2Body* body = fixture->GetBody();
 | 
			
		||||
        void* userData = body->GetUserData();
 | 
			
		||||
        if (userData)
 | 
			
		||||
        {
 | 
			
		||||
            int32 index = *(int32*)userData;
 | 
			
		||||
            if (index == 0)
 | 
			
		||||
            {
 | 
			
		||||
                // filter
 | 
			
		||||
                return -1.0f;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        m_hit = true;
 | 
			
		||||
        m_point = point;
 | 
			
		||||
        m_normal = normal;
 | 
			
		||||
        return 0.0f;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    bool m_hit;
 | 
			
		||||
    b2Vec2 m_point;
 | 
			
		||||
    b2Vec2 m_normal;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
// This ray cast collects multiple hits along the ray. Polygon 0 is filtered.
 | 
			
		||||
class RayCastMultipleCallback : public b2RayCastCallback
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
    enum
 | 
			
		||||
    {
 | 
			
		||||
        e_maxCount = 3
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    RayCastMultipleCallback()
 | 
			
		||||
    {
 | 
			
		||||
        m_count = 0;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    float32 ReportFixture(  b2Fixture* fixture, const b2Vec2& point,
 | 
			
		||||
        const b2Vec2& normal, float32 fraction)
 | 
			
		||||
    {
 | 
			
		||||
        b2Body* body = fixture->GetBody();
 | 
			
		||||
        void* userData = body->GetUserData();
 | 
			
		||||
        if (userData)
 | 
			
		||||
        {
 | 
			
		||||
            int32 index = *(int32*)userData;
 | 
			
		||||
            if (index == 0)
 | 
			
		||||
            {
 | 
			
		||||
                // filter
 | 
			
		||||
                return -1.0f;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        b2Assert(m_count < e_maxCount);
 | 
			
		||||
 | 
			
		||||
        m_points[m_count] = point;
 | 
			
		||||
        m_normals[m_count] = normal;
 | 
			
		||||
        ++m_count;
 | 
			
		||||
 | 
			
		||||
        if (m_count == e_maxCount)
 | 
			
		||||
        {
 | 
			
		||||
            return 0.0f;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        return 1.0f;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    b2Vec2 m_points[e_maxCount];
 | 
			
		||||
    b2Vec2 m_normals[e_maxCount];
 | 
			
		||||
    int32 m_count;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class RayCast : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
 | 
			
		||||
    enum
 | 
			
		||||
    {
 | 
			
		||||
        e_maxBodies = 256
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    enum Mode
 | 
			
		||||
    {
 | 
			
		||||
        e_closest,
 | 
			
		||||
        e_any,
 | 
			
		||||
        e_multiple
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    RayCast()
 | 
			
		||||
    {
 | 
			
		||||
        // Ground body
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            b2Body* ground = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2EdgeShape shape;
 | 
			
		||||
            shape.Set(b2Vec2(-40.0f, 0.0f), b2Vec2(40.0f, 0.0f));
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2Vec2 vertices[3];
 | 
			
		||||
            vertices[0].Set(-0.5f, 0.0f);
 | 
			
		||||
            vertices[1].Set(0.5f, 0.0f);
 | 
			
		||||
            vertices[2].Set(0.0f, 1.5f);
 | 
			
		||||
            m_polygons[0].Set(vertices, 3);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2Vec2 vertices[3];
 | 
			
		||||
            vertices[0].Set(-0.1f, 0.0f);
 | 
			
		||||
            vertices[1].Set(0.1f, 0.0f);
 | 
			
		||||
            vertices[2].Set(0.0f, 1.5f);
 | 
			
		||||
            m_polygons[1].Set(vertices, 3);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            float32 w = 1.0f;
 | 
			
		||||
            float32 b = w / (2.0f + b2Sqrt(2.0f));
 | 
			
		||||
            float32 s = b2Sqrt(2.0f) * b;
 | 
			
		||||
 | 
			
		||||
            b2Vec2 vertices[8];
 | 
			
		||||
            vertices[0].Set(0.5f * s, 0.0f);
 | 
			
		||||
            vertices[1].Set(0.5f * w, b);
 | 
			
		||||
            vertices[2].Set(0.5f * w, b + s);
 | 
			
		||||
            vertices[3].Set(0.5f * s, w);
 | 
			
		||||
            vertices[4].Set(-0.5f * s, w);
 | 
			
		||||
            vertices[5].Set(-0.5f * w, b + s);
 | 
			
		||||
            vertices[6].Set(-0.5f * w, b);
 | 
			
		||||
            vertices[7].Set(-0.5f * s, 0.0f);
 | 
			
		||||
 | 
			
		||||
            m_polygons[2].Set(vertices, 8);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            m_polygons[3].SetAsBox(0.5f, 0.5f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            m_circle.m_radius = 0.5f;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        m_bodyIndex = 0;
 | 
			
		||||
        memset(m_bodies, 0, sizeof(m_bodies));
 | 
			
		||||
 | 
			
		||||
        m_angle = 0.0f;
 | 
			
		||||
 | 
			
		||||
        m_mode = e_closest;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Create(int32 index)
 | 
			
		||||
    {
 | 
			
		||||
        if (m_bodies[m_bodyIndex] != NULL)
 | 
			
		||||
        {
 | 
			
		||||
            m_world->DestroyBody(m_bodies[m_bodyIndex]);
 | 
			
		||||
            m_bodies[m_bodyIndex] = NULL;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        b2BodyDef bd;
 | 
			
		||||
 | 
			
		||||
        float32 x = RandomFloat(-10.0f, 10.0f);
 | 
			
		||||
        float32 y = RandomFloat(0.0f, 20.0f);
 | 
			
		||||
        bd.position.Set(x, y);
 | 
			
		||||
        bd.angle = RandomFloat(-b2_pi, b2_pi);
 | 
			
		||||
 | 
			
		||||
        m_userData[m_bodyIndex] = index;
 | 
			
		||||
        bd.userData = m_userData + m_bodyIndex;
 | 
			
		||||
 | 
			
		||||
        if (index == 4)
 | 
			
		||||
        {
 | 
			
		||||
            bd.angularDamping = 0.02f;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        m_bodies[m_bodyIndex] = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
        if (index < 4)
 | 
			
		||||
        {
 | 
			
		||||
            b2FixtureDef fd;
 | 
			
		||||
            fd.shape = m_polygons + index;
 | 
			
		||||
            fd.friction = 0.3f;
 | 
			
		||||
            m_bodies[m_bodyIndex]->CreateFixture(&fd);
 | 
			
		||||
        }
 | 
			
		||||
        else
 | 
			
		||||
        {
 | 
			
		||||
            b2FixtureDef fd;
 | 
			
		||||
            fd.shape = &m_circle;
 | 
			
		||||
            fd.friction = 0.3f;
 | 
			
		||||
 | 
			
		||||
            m_bodies[m_bodyIndex]->CreateFixture(&fd);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        m_bodyIndex = (m_bodyIndex + 1) % e_maxBodies;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void DestroyBody()
 | 
			
		||||
    {
 | 
			
		||||
        for (int32 i = 0; i < e_maxBodies; ++i)
 | 
			
		||||
        {
 | 
			
		||||
            if (m_bodies[i] != NULL)
 | 
			
		||||
            {
 | 
			
		||||
                m_world->DestroyBody(m_bodies[i]);
 | 
			
		||||
                m_bodies[i] = NULL;
 | 
			
		||||
                return;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Keyboard(unsigned char key)
 | 
			
		||||
    {
 | 
			
		||||
        switch (key)
 | 
			
		||||
        {
 | 
			
		||||
        case '1':
 | 
			
		||||
        case '2':
 | 
			
		||||
        case '3':
 | 
			
		||||
        case '4':
 | 
			
		||||
        case '5':
 | 
			
		||||
            Create(key - '1');
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case 'd':
 | 
			
		||||
            DestroyBody();
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case 'm':
 | 
			
		||||
            if (m_mode == e_closest)
 | 
			
		||||
            {
 | 
			
		||||
                m_mode = e_any;
 | 
			
		||||
            }
 | 
			
		||||
            else if (m_mode == e_any)
 | 
			
		||||
            {
 | 
			
		||||
                m_mode = e_multiple;
 | 
			
		||||
            }
 | 
			
		||||
            else if (m_mode == e_multiple)
 | 
			
		||||
            {
 | 
			
		||||
                m_mode = e_closest;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Step(Settings* settings)
 | 
			
		||||
    {
 | 
			
		||||
        bool advanceRay = settings->pause == 0 || settings->singleStep;
 | 
			
		||||
 | 
			
		||||
        Test::Step(settings);
 | 
			
		||||
        m_debugDraw.DrawString(5, m_textLine, "Press 1-5 to drop stuff, m to change the mode");
 | 
			
		||||
        m_textLine += 15;
 | 
			
		||||
        m_debugDraw.DrawString(5, m_textLine, "Mode = %d", m_mode);
 | 
			
		||||
        m_textLine += 15;
 | 
			
		||||
 | 
			
		||||
        float32 L = 11.0f;
 | 
			
		||||
        b2Vec2 point1(0.0f, 10.0f);
 | 
			
		||||
        b2Vec2 d(L * cosf(m_angle), L * sinf(m_angle));
 | 
			
		||||
        b2Vec2 point2 = point1 + d;
 | 
			
		||||
 | 
			
		||||
        if (m_mode == e_closest)
 | 
			
		||||
        {
 | 
			
		||||
            RayCastClosestCallback callback;
 | 
			
		||||
            m_world->RayCast(&callback, point1, point2);
 | 
			
		||||
 | 
			
		||||
            if (callback.m_hit)
 | 
			
		||||
            {
 | 
			
		||||
                m_debugDraw.DrawPoint(callback.m_point, 5.0f, b2Color(0.4f, 0.9f, 0.4f));
 | 
			
		||||
                m_debugDraw.DrawSegment(point1, callback.m_point, b2Color(0.8f, 0.8f, 0.8f));
 | 
			
		||||
                b2Vec2 head = callback.m_point + 0.5f * callback.m_normal;
 | 
			
		||||
                m_debugDraw.DrawSegment(callback.m_point, head, b2Color(0.9f, 0.9f, 0.4f));
 | 
			
		||||
            }
 | 
			
		||||
            else
 | 
			
		||||
            {
 | 
			
		||||
                m_debugDraw.DrawSegment(point1, point2, b2Color(0.8f, 0.8f, 0.8f));
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        else if (m_mode == e_any)
 | 
			
		||||
        {
 | 
			
		||||
            RayCastAnyCallback callback;
 | 
			
		||||
            m_world->RayCast(&callback, point1, point2);
 | 
			
		||||
 | 
			
		||||
            if (callback.m_hit)
 | 
			
		||||
            {
 | 
			
		||||
                m_debugDraw.DrawPoint(callback.m_point, 5.0f, b2Color(0.4f, 0.9f, 0.4f));
 | 
			
		||||
                m_debugDraw.DrawSegment(point1, callback.m_point, b2Color(0.8f, 0.8f, 0.8f));
 | 
			
		||||
                b2Vec2 head = callback.m_point + 0.5f * callback.m_normal;
 | 
			
		||||
                m_debugDraw.DrawSegment(callback.m_point, head, b2Color(0.9f, 0.9f, 0.4f));
 | 
			
		||||
            }
 | 
			
		||||
            else
 | 
			
		||||
            {
 | 
			
		||||
                m_debugDraw.DrawSegment(point1, point2, b2Color(0.8f, 0.8f, 0.8f));
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        else if (m_mode == e_multiple)
 | 
			
		||||
        {
 | 
			
		||||
            RayCastMultipleCallback callback;
 | 
			
		||||
            m_world->RayCast(&callback, point1, point2);
 | 
			
		||||
            m_debugDraw.DrawSegment(point1, point2, b2Color(0.8f, 0.8f, 0.8f));
 | 
			
		||||
 | 
			
		||||
            for (int32 i = 0; i < callback.m_count; ++i)
 | 
			
		||||
            {
 | 
			
		||||
                b2Vec2 p = callback.m_points[i];
 | 
			
		||||
                b2Vec2 n = callback.m_normals[i];
 | 
			
		||||
                m_debugDraw.DrawPoint(p, 5.0f, b2Color(0.4f, 0.9f, 0.4f));
 | 
			
		||||
                m_debugDraw.DrawSegment(point1, p, b2Color(0.8f, 0.8f, 0.8f));
 | 
			
		||||
                b2Vec2 head = p + 0.5f * n;
 | 
			
		||||
                m_debugDraw.DrawSegment(p, head, b2Color(0.9f, 0.9f, 0.4f));
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (advanceRay)
 | 
			
		||||
        {
 | 
			
		||||
            m_angle += 0.25f * b2_pi / 180.0f;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
#if 0
 | 
			
		||||
        // This case was failing.
 | 
			
		||||
        {
 | 
			
		||||
            b2Vec2 vertices[4];
 | 
			
		||||
            //vertices[0].Set(-22.875f, -3.0f);
 | 
			
		||||
            //vertices[1].Set(22.875f, -3.0f);
 | 
			
		||||
            //vertices[2].Set(22.875f, 3.0f);
 | 
			
		||||
            //vertices[3].Set(-22.875f, 3.0f);
 | 
			
		||||
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            //shape.Set(vertices, 4);
 | 
			
		||||
            shape.SetAsBox(22.875f, 3.0f);
 | 
			
		||||
 | 
			
		||||
            b2RayCastInput input;
 | 
			
		||||
            input.p1.Set(10.2725f,1.71372f);
 | 
			
		||||
            input.p2.Set(10.2353f,2.21807f);
 | 
			
		||||
            //input.maxFraction = 0.567623f;
 | 
			
		||||
            input.maxFraction = 0.56762173f;
 | 
			
		||||
 | 
			
		||||
            b2Transform xf;
 | 
			
		||||
            xf.SetIdentity();
 | 
			
		||||
            xf.position.Set(23.0f, 5.0f);
 | 
			
		||||
 | 
			
		||||
            b2RayCastOutput output;
 | 
			
		||||
            bool hit;
 | 
			
		||||
            hit = shape.RayCast(&output, input, xf);
 | 
			
		||||
            hit = false;
 | 
			
		||||
 | 
			
		||||
            b2Color color(1.0f, 1.0f, 1.0f);
 | 
			
		||||
            b2Vec2 vs[4];
 | 
			
		||||
            for (int32 i = 0; i < 4; ++i)
 | 
			
		||||
            {
 | 
			
		||||
                vs[i] = b2Mul(xf, shape.m_vertices[i]);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            m_debugDraw.DrawPolygon(vs, 4, color);
 | 
			
		||||
            m_debugDraw.DrawSegment(input.p1, input.p2, color);
 | 
			
		||||
        }
 | 
			
		||||
#endif
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new RayCast;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    int32 m_bodyIndex;
 | 
			
		||||
    b2Body* m_bodies[e_maxBodies];
 | 
			
		||||
    int32 m_userData[e_maxBodies];
 | 
			
		||||
    b2PolygonShape m_polygons[4];
 | 
			
		||||
    b2CircleShape m_circle;
 | 
			
		||||
 | 
			
		||||
    float32 m_angle;
 | 
			
		||||
 | 
			
		||||
    Mode m_mode;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef RAY_CAST_H
 | 
			
		||||
#define RAY_CAST_H
 | 
			
		||||
 | 
			
		||||
// This test demonstrates how to use the world ray-cast feature.
 | 
			
		||||
// NOTE: we are intentionally filtering one of the polygons, therefore
 | 
			
		||||
// the ray will always miss one type of polygon.
 | 
			
		||||
 | 
			
		||||
// This callback finds the closest hit. Polygon 0 is filtered.
 | 
			
		||||
class RayCastClosestCallback : public b2RayCastCallback
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
    RayCastClosestCallback()
 | 
			
		||||
    {
 | 
			
		||||
        m_hit = false;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    float32 ReportFixture(  b2Fixture* fixture, const b2Vec2& point,
 | 
			
		||||
        const b2Vec2& normal, float32 fraction)
 | 
			
		||||
    {
 | 
			
		||||
        b2Body* body = fixture->GetBody();
 | 
			
		||||
        void* userData = body->GetUserData();
 | 
			
		||||
        if (userData)
 | 
			
		||||
        {
 | 
			
		||||
            int32 index = *(int32*)userData;
 | 
			
		||||
            if (index == 0)
 | 
			
		||||
            {
 | 
			
		||||
                // filter
 | 
			
		||||
                return -1.0f;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        m_hit = true;
 | 
			
		||||
        m_point = point;
 | 
			
		||||
        m_normal = normal;
 | 
			
		||||
        return fraction;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    bool m_hit;
 | 
			
		||||
    b2Vec2 m_point;
 | 
			
		||||
    b2Vec2 m_normal;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
// This callback finds any hit. Polygon 0 is filtered.
 | 
			
		||||
class RayCastAnyCallback : public b2RayCastCallback
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
    RayCastAnyCallback()
 | 
			
		||||
    {
 | 
			
		||||
        m_hit = false;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    float32 ReportFixture(  b2Fixture* fixture, const b2Vec2& point,
 | 
			
		||||
        const b2Vec2& normal, float32 fraction)
 | 
			
		||||
    {
 | 
			
		||||
        b2Body* body = fixture->GetBody();
 | 
			
		||||
        void* userData = body->GetUserData();
 | 
			
		||||
        if (userData)
 | 
			
		||||
        {
 | 
			
		||||
            int32 index = *(int32*)userData;
 | 
			
		||||
            if (index == 0)
 | 
			
		||||
            {
 | 
			
		||||
                // filter
 | 
			
		||||
                return -1.0f;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        m_hit = true;
 | 
			
		||||
        m_point = point;
 | 
			
		||||
        m_normal = normal;
 | 
			
		||||
        return 0.0f;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    bool m_hit;
 | 
			
		||||
    b2Vec2 m_point;
 | 
			
		||||
    b2Vec2 m_normal;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
// This ray cast collects multiple hits along the ray. Polygon 0 is filtered.
 | 
			
		||||
class RayCastMultipleCallback : public b2RayCastCallback
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
    enum
 | 
			
		||||
    {
 | 
			
		||||
        e_maxCount = 3
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    RayCastMultipleCallback()
 | 
			
		||||
    {
 | 
			
		||||
        m_count = 0;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    float32 ReportFixture(  b2Fixture* fixture, const b2Vec2& point,
 | 
			
		||||
        const b2Vec2& normal, float32 fraction)
 | 
			
		||||
    {
 | 
			
		||||
        b2Body* body = fixture->GetBody();
 | 
			
		||||
        void* userData = body->GetUserData();
 | 
			
		||||
        if (userData)
 | 
			
		||||
        {
 | 
			
		||||
            int32 index = *(int32*)userData;
 | 
			
		||||
            if (index == 0)
 | 
			
		||||
            {
 | 
			
		||||
                // filter
 | 
			
		||||
                return -1.0f;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        b2Assert(m_count < e_maxCount);
 | 
			
		||||
 | 
			
		||||
        m_points[m_count] = point;
 | 
			
		||||
        m_normals[m_count] = normal;
 | 
			
		||||
        ++m_count;
 | 
			
		||||
 | 
			
		||||
        if (m_count == e_maxCount)
 | 
			
		||||
        {
 | 
			
		||||
            return 0.0f;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        return 1.0f;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    b2Vec2 m_points[e_maxCount];
 | 
			
		||||
    b2Vec2 m_normals[e_maxCount];
 | 
			
		||||
    int32 m_count;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class RayCast : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
 | 
			
		||||
    enum
 | 
			
		||||
    {
 | 
			
		||||
        e_maxBodies = 256
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    enum Mode
 | 
			
		||||
    {
 | 
			
		||||
        e_closest,
 | 
			
		||||
        e_any,
 | 
			
		||||
        e_multiple
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    RayCast()
 | 
			
		||||
    {
 | 
			
		||||
        // Ground body
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            b2Body* ground = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2EdgeShape shape;
 | 
			
		||||
            shape.Set(b2Vec2(-40.0f, 0.0f), b2Vec2(40.0f, 0.0f));
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2Vec2 vertices[3];
 | 
			
		||||
            vertices[0].Set(-0.5f, 0.0f);
 | 
			
		||||
            vertices[1].Set(0.5f, 0.0f);
 | 
			
		||||
            vertices[2].Set(0.0f, 1.5f);
 | 
			
		||||
            m_polygons[0].Set(vertices, 3);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2Vec2 vertices[3];
 | 
			
		||||
            vertices[0].Set(-0.1f, 0.0f);
 | 
			
		||||
            vertices[1].Set(0.1f, 0.0f);
 | 
			
		||||
            vertices[2].Set(0.0f, 1.5f);
 | 
			
		||||
            m_polygons[1].Set(vertices, 3);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            float32 w = 1.0f;
 | 
			
		||||
            float32 b = w / (2.0f + b2Sqrt(2.0f));
 | 
			
		||||
            float32 s = b2Sqrt(2.0f) * b;
 | 
			
		||||
 | 
			
		||||
            b2Vec2 vertices[8];
 | 
			
		||||
            vertices[0].Set(0.5f * s, 0.0f);
 | 
			
		||||
            vertices[1].Set(0.5f * w, b);
 | 
			
		||||
            vertices[2].Set(0.5f * w, b + s);
 | 
			
		||||
            vertices[3].Set(0.5f * s, w);
 | 
			
		||||
            vertices[4].Set(-0.5f * s, w);
 | 
			
		||||
            vertices[5].Set(-0.5f * w, b + s);
 | 
			
		||||
            vertices[6].Set(-0.5f * w, b);
 | 
			
		||||
            vertices[7].Set(-0.5f * s, 0.0f);
 | 
			
		||||
 | 
			
		||||
            m_polygons[2].Set(vertices, 8);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            m_polygons[3].SetAsBox(0.5f, 0.5f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            m_circle.m_radius = 0.5f;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        m_bodyIndex = 0;
 | 
			
		||||
        memset(m_bodies, 0, sizeof(m_bodies));
 | 
			
		||||
 | 
			
		||||
        m_angle = 0.0f;
 | 
			
		||||
 | 
			
		||||
        m_mode = e_closest;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Create(int32 index)
 | 
			
		||||
    {
 | 
			
		||||
        if (m_bodies[m_bodyIndex] != NULL)
 | 
			
		||||
        {
 | 
			
		||||
            m_world->DestroyBody(m_bodies[m_bodyIndex]);
 | 
			
		||||
            m_bodies[m_bodyIndex] = NULL;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        b2BodyDef bd;
 | 
			
		||||
 | 
			
		||||
        float32 x = RandomFloat(-10.0f, 10.0f);
 | 
			
		||||
        float32 y = RandomFloat(0.0f, 20.0f);
 | 
			
		||||
        bd.position.Set(x, y);
 | 
			
		||||
        bd.angle = RandomFloat(-b2_pi, b2_pi);
 | 
			
		||||
 | 
			
		||||
        m_userData[m_bodyIndex] = index;
 | 
			
		||||
        bd.userData = m_userData + m_bodyIndex;
 | 
			
		||||
 | 
			
		||||
        if (index == 4)
 | 
			
		||||
        {
 | 
			
		||||
            bd.angularDamping = 0.02f;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        m_bodies[m_bodyIndex] = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
        if (index < 4)
 | 
			
		||||
        {
 | 
			
		||||
            b2FixtureDef fd;
 | 
			
		||||
            fd.shape = m_polygons + index;
 | 
			
		||||
            fd.friction = 0.3f;
 | 
			
		||||
            m_bodies[m_bodyIndex]->CreateFixture(&fd);
 | 
			
		||||
        }
 | 
			
		||||
        else
 | 
			
		||||
        {
 | 
			
		||||
            b2FixtureDef fd;
 | 
			
		||||
            fd.shape = &m_circle;
 | 
			
		||||
            fd.friction = 0.3f;
 | 
			
		||||
 | 
			
		||||
            m_bodies[m_bodyIndex]->CreateFixture(&fd);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        m_bodyIndex = (m_bodyIndex + 1) % e_maxBodies;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void DestroyBody()
 | 
			
		||||
    {
 | 
			
		||||
        for (int32 i = 0; i < e_maxBodies; ++i)
 | 
			
		||||
        {
 | 
			
		||||
            if (m_bodies[i] != NULL)
 | 
			
		||||
            {
 | 
			
		||||
                m_world->DestroyBody(m_bodies[i]);
 | 
			
		||||
                m_bodies[i] = NULL;
 | 
			
		||||
                return;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Keyboard(unsigned char key)
 | 
			
		||||
    {
 | 
			
		||||
        switch (key)
 | 
			
		||||
        {
 | 
			
		||||
        case '1':
 | 
			
		||||
        case '2':
 | 
			
		||||
        case '3':
 | 
			
		||||
        case '4':
 | 
			
		||||
        case '5':
 | 
			
		||||
            Create(key - '1');
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case 'd':
 | 
			
		||||
            DestroyBody();
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case 'm':
 | 
			
		||||
            if (m_mode == e_closest)
 | 
			
		||||
            {
 | 
			
		||||
                m_mode = e_any;
 | 
			
		||||
            }
 | 
			
		||||
            else if (m_mode == e_any)
 | 
			
		||||
            {
 | 
			
		||||
                m_mode = e_multiple;
 | 
			
		||||
            }
 | 
			
		||||
            else if (m_mode == e_multiple)
 | 
			
		||||
            {
 | 
			
		||||
                m_mode = e_closest;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Step(Settings* settings)
 | 
			
		||||
    {
 | 
			
		||||
        bool advanceRay = settings->pause == 0 || settings->singleStep;
 | 
			
		||||
 | 
			
		||||
        Test::Step(settings);
 | 
			
		||||
        m_debugDraw.DrawString(5, m_textLine, "Press 1-5 to drop stuff, m to change the mode");
 | 
			
		||||
        m_textLine += 15;
 | 
			
		||||
        m_debugDraw.DrawString(5, m_textLine, "Mode = %d", m_mode);
 | 
			
		||||
        m_textLine += 15;
 | 
			
		||||
 | 
			
		||||
        float32 L = 11.0f;
 | 
			
		||||
        b2Vec2 point1(0.0f, 10.0f);
 | 
			
		||||
        b2Vec2 d(L * cosf(m_angle), L * sinf(m_angle));
 | 
			
		||||
        b2Vec2 point2 = point1 + d;
 | 
			
		||||
 | 
			
		||||
        if (m_mode == e_closest)
 | 
			
		||||
        {
 | 
			
		||||
            RayCastClosestCallback callback;
 | 
			
		||||
            m_world->RayCast(&callback, point1, point2);
 | 
			
		||||
 | 
			
		||||
            if (callback.m_hit)
 | 
			
		||||
            {
 | 
			
		||||
                m_debugDraw.DrawPoint(callback.m_point, 5.0f, b2Color(0.4f, 0.9f, 0.4f));
 | 
			
		||||
                m_debugDraw.DrawSegment(point1, callback.m_point, b2Color(0.8f, 0.8f, 0.8f));
 | 
			
		||||
                b2Vec2 head = callback.m_point + 0.5f * callback.m_normal;
 | 
			
		||||
                m_debugDraw.DrawSegment(callback.m_point, head, b2Color(0.9f, 0.9f, 0.4f));
 | 
			
		||||
            }
 | 
			
		||||
            else
 | 
			
		||||
            {
 | 
			
		||||
                m_debugDraw.DrawSegment(point1, point2, b2Color(0.8f, 0.8f, 0.8f));
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        else if (m_mode == e_any)
 | 
			
		||||
        {
 | 
			
		||||
            RayCastAnyCallback callback;
 | 
			
		||||
            m_world->RayCast(&callback, point1, point2);
 | 
			
		||||
 | 
			
		||||
            if (callback.m_hit)
 | 
			
		||||
            {
 | 
			
		||||
                m_debugDraw.DrawPoint(callback.m_point, 5.0f, b2Color(0.4f, 0.9f, 0.4f));
 | 
			
		||||
                m_debugDraw.DrawSegment(point1, callback.m_point, b2Color(0.8f, 0.8f, 0.8f));
 | 
			
		||||
                b2Vec2 head = callback.m_point + 0.5f * callback.m_normal;
 | 
			
		||||
                m_debugDraw.DrawSegment(callback.m_point, head, b2Color(0.9f, 0.9f, 0.4f));
 | 
			
		||||
            }
 | 
			
		||||
            else
 | 
			
		||||
            {
 | 
			
		||||
                m_debugDraw.DrawSegment(point1, point2, b2Color(0.8f, 0.8f, 0.8f));
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        else if (m_mode == e_multiple)
 | 
			
		||||
        {
 | 
			
		||||
            RayCastMultipleCallback callback;
 | 
			
		||||
            m_world->RayCast(&callback, point1, point2);
 | 
			
		||||
            m_debugDraw.DrawSegment(point1, point2, b2Color(0.8f, 0.8f, 0.8f));
 | 
			
		||||
 | 
			
		||||
            for (int32 i = 0; i < callback.m_count; ++i)
 | 
			
		||||
            {
 | 
			
		||||
                b2Vec2 p = callback.m_points[i];
 | 
			
		||||
                b2Vec2 n = callback.m_normals[i];
 | 
			
		||||
                m_debugDraw.DrawPoint(p, 5.0f, b2Color(0.4f, 0.9f, 0.4f));
 | 
			
		||||
                m_debugDraw.DrawSegment(point1, p, b2Color(0.8f, 0.8f, 0.8f));
 | 
			
		||||
                b2Vec2 head = p + 0.5f * n;
 | 
			
		||||
                m_debugDraw.DrawSegment(p, head, b2Color(0.9f, 0.9f, 0.4f));
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (advanceRay)
 | 
			
		||||
        {
 | 
			
		||||
            m_angle += 0.25f * b2_pi / 180.0f;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
#if 0
 | 
			
		||||
        // This case was failing.
 | 
			
		||||
        {
 | 
			
		||||
            b2Vec2 vertices[4];
 | 
			
		||||
            //vertices[0].Set(-22.875f, -3.0f);
 | 
			
		||||
            //vertices[1].Set(22.875f, -3.0f);
 | 
			
		||||
            //vertices[2].Set(22.875f, 3.0f);
 | 
			
		||||
            //vertices[3].Set(-22.875f, 3.0f);
 | 
			
		||||
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            //shape.Set(vertices, 4);
 | 
			
		||||
            shape.SetAsBox(22.875f, 3.0f);
 | 
			
		||||
 | 
			
		||||
            b2RayCastInput input;
 | 
			
		||||
            input.p1.Set(10.2725f,1.71372f);
 | 
			
		||||
            input.p2.Set(10.2353f,2.21807f);
 | 
			
		||||
            //input.maxFraction = 0.567623f;
 | 
			
		||||
            input.maxFraction = 0.56762173f;
 | 
			
		||||
 | 
			
		||||
            b2Transform xf;
 | 
			
		||||
            xf.SetIdentity();
 | 
			
		||||
            xf.position.Set(23.0f, 5.0f);
 | 
			
		||||
 | 
			
		||||
            b2RayCastOutput output;
 | 
			
		||||
            bool hit;
 | 
			
		||||
            hit = shape.RayCast(&output, input, xf);
 | 
			
		||||
            hit = false;
 | 
			
		||||
 | 
			
		||||
            b2Color color(1.0f, 1.0f, 1.0f);
 | 
			
		||||
            b2Vec2 vs[4];
 | 
			
		||||
            for (int32 i = 0; i < 4; ++i)
 | 
			
		||||
            {
 | 
			
		||||
                vs[i] = b2Mul(xf, shape.m_vertices[i]);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            m_debugDraw.DrawPolygon(vs, 4, color);
 | 
			
		||||
            m_debugDraw.DrawSegment(input.p1, input.p2, color);
 | 
			
		||||
        }
 | 
			
		||||
#endif
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new RayCast;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    int32 m_bodyIndex;
 | 
			
		||||
    b2Body* m_bodies[e_maxBodies];
 | 
			
		||||
    int32 m_userData[e_maxBodies];
 | 
			
		||||
    b2PolygonShape m_polygons[4];
 | 
			
		||||
    b2CircleShape m_circle;
 | 
			
		||||
 | 
			
		||||
    float32 m_angle;
 | 
			
		||||
 | 
			
		||||
    Mode m_mode;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -1,166 +1,166 @@
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef REVOLUTE_H
 | 
			
		||||
#define REVOLUTE_H
 | 
			
		||||
 | 
			
		||||
class Revolute : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
    Revolute()
 | 
			
		||||
    {
 | 
			
		||||
        b2Body* ground = NULL;
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            ground = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2EdgeShape shape;
 | 
			
		||||
            shape.Set(b2Vec2(-40.0f, 0.0f), b2Vec2(40.0f, 0.0f));
 | 
			
		||||
 | 
			
		||||
            b2FixtureDef fd;
 | 
			
		||||
            fd.shape = &shape;
 | 
			
		||||
            //fd.filter.categoryBits = 2;
 | 
			
		||||
 | 
			
		||||
            ground->CreateFixture(&fd);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2CircleShape shape;
 | 
			
		||||
            shape.m_radius = 0.5f;
 | 
			
		||||
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
 | 
			
		||||
            b2RevoluteJointDef rjd;
 | 
			
		||||
 | 
			
		||||
            bd.position.Set(-10.0f, 20.0f);
 | 
			
		||||
            b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
            body->CreateFixture(&shape, 5.0f);
 | 
			
		||||
 | 
			
		||||
            float32 w = 100.0f;
 | 
			
		||||
            body->SetAngularVelocity(w);
 | 
			
		||||
            body->SetLinearVelocity(b2Vec2(-8.0f * w, 0.0f));
 | 
			
		||||
 | 
			
		||||
            rjd.Initialize(ground, body, b2Vec2(-10.0f, 12.0f));
 | 
			
		||||
            rjd.motorSpeed = 1.0f * b2_pi;
 | 
			
		||||
            rjd.maxMotorTorque = 10000.0f;
 | 
			
		||||
            rjd.enableMotor = false;
 | 
			
		||||
            rjd.lowerAngle = -0.25f * b2_pi;
 | 
			
		||||
            rjd.upperAngle = 0.5f * b2_pi;
 | 
			
		||||
            rjd.enableLimit = true;
 | 
			
		||||
            rjd.collideConnected = true;
 | 
			
		||||
 | 
			
		||||
            m_joint = (b2RevoluteJoint*)m_world->CreateJoint(&rjd);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2CircleShape circle_shape;
 | 
			
		||||
            circle_shape.m_radius = 3.0f;
 | 
			
		||||
 | 
			
		||||
            b2BodyDef circle_bd;
 | 
			
		||||
            circle_bd.type = b2_dynamicBody;
 | 
			
		||||
            circle_bd.position.Set(5.0f, 30.0f);
 | 
			
		||||
 | 
			
		||||
            b2FixtureDef fd;
 | 
			
		||||
            fd.density = 5.0f;
 | 
			
		||||
            fd.filter.maskBits = 1;
 | 
			
		||||
            fd.shape = &circle_shape;
 | 
			
		||||
 | 
			
		||||
            m_ball = m_world->CreateBody(&circle_bd);
 | 
			
		||||
            m_ball->CreateFixture(&fd);
 | 
			
		||||
 | 
			
		||||
            b2PolygonShape polygon_shape;
 | 
			
		||||
            polygon_shape.SetAsBox(10.0f, 0.2f, b2Vec2 (-10.0f, 0.0f), 0.0f);
 | 
			
		||||
 | 
			
		||||
            b2BodyDef polygon_bd;
 | 
			
		||||
            polygon_bd.position.Set(20.0f, 10.0f);
 | 
			
		||||
            polygon_bd.type = b2_dynamicBody;
 | 
			
		||||
            polygon_bd.bullet = true;
 | 
			
		||||
            b2Body* polygon_body = m_world->CreateBody(&polygon_bd);
 | 
			
		||||
            polygon_body->CreateFixture(&polygon_shape, 2.0f);
 | 
			
		||||
 | 
			
		||||
            b2RevoluteJointDef rjd;
 | 
			
		||||
            rjd.Initialize(ground, polygon_body, b2Vec2(20.0f, 10.0f));
 | 
			
		||||
            rjd.lowerAngle = -0.25f * b2_pi;
 | 
			
		||||
            rjd.upperAngle = 0.0f * b2_pi;
 | 
			
		||||
            rjd.enableLimit = true;
 | 
			
		||||
            m_world->CreateJoint(&rjd);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Tests mass computation of a small object far from the origin
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bodyDef;
 | 
			
		||||
            bodyDef.type = b2_dynamicBody;
 | 
			
		||||
            b2Body* body = m_world->CreateBody(&bodyDef);
 | 
			
		||||
 | 
			
		||||
            b2PolygonShape polyShape;
 | 
			
		||||
            b2Vec2 verts[3];
 | 
			
		||||
            verts[0].Set( 17.63f, 36.31f );
 | 
			
		||||
            verts[1].Set( 17.52f, 36.69f );
 | 
			
		||||
            verts[2].Set( 17.19f, 36.36f );
 | 
			
		||||
            polyShape.Set(verts, 3);
 | 
			
		||||
 | 
			
		||||
            b2FixtureDef polyFixtureDef;
 | 
			
		||||
            polyFixtureDef.shape = &polyShape;
 | 
			
		||||
            polyFixtureDef.density = 1;
 | 
			
		||||
 | 
			
		||||
            body->CreateFixture(&polyFixtureDef);   //assertion hits inside here
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Keyboard(unsigned char key)
 | 
			
		||||
    {
 | 
			
		||||
        switch (key)
 | 
			
		||||
        {
 | 
			
		||||
        case 'l':
 | 
			
		||||
            m_joint->EnableLimit(!m_joint->IsLimitEnabled());
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case 'm':
 | 
			
		||||
            m_joint->EnableMotor(!m_joint->IsMotorEnabled());
 | 
			
		||||
            break;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Step(Settings* settings)
 | 
			
		||||
    {
 | 
			
		||||
        Test::Step(settings);
 | 
			
		||||
        m_debugDraw.DrawString(5, m_textLine, "Keys: (l) limits, (m) motor");
 | 
			
		||||
        m_textLine += 15;
 | 
			
		||||
 | 
			
		||||
        //if (m_stepCount == 360)
 | 
			
		||||
        //{
 | 
			
		||||
        //  m_ball->SetTransform(b2Vec2(0.0f, 0.5f), 0.0f);
 | 
			
		||||
        //}
 | 
			
		||||
 | 
			
		||||
        //float32 torque1 = m_joint1->GetMotorTorque();
 | 
			
		||||
        //m_debugDraw.DrawString(5, m_textLine, "Motor Torque = %4.0f, %4.0f : Motor Force = %4.0f", (float) torque1, (float) torque2, (float) force3);
 | 
			
		||||
        //m_textLine += 15;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new Revolute;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    b2Body* m_ball;
 | 
			
		||||
    b2RevoluteJoint* m_joint;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef REVOLUTE_H
 | 
			
		||||
#define REVOLUTE_H
 | 
			
		||||
 | 
			
		||||
class Revolute : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
    Revolute()
 | 
			
		||||
    {
 | 
			
		||||
        b2Body* ground = NULL;
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            ground = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2EdgeShape shape;
 | 
			
		||||
            shape.Set(b2Vec2(-40.0f, 0.0f), b2Vec2(40.0f, 0.0f));
 | 
			
		||||
 | 
			
		||||
            b2FixtureDef fd;
 | 
			
		||||
            fd.shape = &shape;
 | 
			
		||||
            //fd.filter.categoryBits = 2;
 | 
			
		||||
 | 
			
		||||
            ground->CreateFixture(&fd);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2CircleShape shape;
 | 
			
		||||
            shape.m_radius = 0.5f;
 | 
			
		||||
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
 | 
			
		||||
            b2RevoluteJointDef rjd;
 | 
			
		||||
 | 
			
		||||
            bd.position.Set(-10.0f, 20.0f);
 | 
			
		||||
            b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
            body->CreateFixture(&shape, 5.0f);
 | 
			
		||||
 | 
			
		||||
            float32 w = 100.0f;
 | 
			
		||||
            body->SetAngularVelocity(w);
 | 
			
		||||
            body->SetLinearVelocity(b2Vec2(-8.0f * w, 0.0f));
 | 
			
		||||
 | 
			
		||||
            rjd.Initialize(ground, body, b2Vec2(-10.0f, 12.0f));
 | 
			
		||||
            rjd.motorSpeed = 1.0f * b2_pi;
 | 
			
		||||
            rjd.maxMotorTorque = 10000.0f;
 | 
			
		||||
            rjd.enableMotor = false;
 | 
			
		||||
            rjd.lowerAngle = -0.25f * b2_pi;
 | 
			
		||||
            rjd.upperAngle = 0.5f * b2_pi;
 | 
			
		||||
            rjd.enableLimit = true;
 | 
			
		||||
            rjd.collideConnected = true;
 | 
			
		||||
 | 
			
		||||
            m_joint = (b2RevoluteJoint*)m_world->CreateJoint(&rjd);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2CircleShape circle_shape;
 | 
			
		||||
            circle_shape.m_radius = 3.0f;
 | 
			
		||||
 | 
			
		||||
            b2BodyDef circle_bd;
 | 
			
		||||
            circle_bd.type = b2_dynamicBody;
 | 
			
		||||
            circle_bd.position.Set(5.0f, 30.0f);
 | 
			
		||||
 | 
			
		||||
            b2FixtureDef fd;
 | 
			
		||||
            fd.density = 5.0f;
 | 
			
		||||
            fd.filter.maskBits = 1;
 | 
			
		||||
            fd.shape = &circle_shape;
 | 
			
		||||
 | 
			
		||||
            m_ball = m_world->CreateBody(&circle_bd);
 | 
			
		||||
            m_ball->CreateFixture(&fd);
 | 
			
		||||
 | 
			
		||||
            b2PolygonShape polygon_shape;
 | 
			
		||||
            polygon_shape.SetAsBox(10.0f, 0.2f, b2Vec2 (-10.0f, 0.0f), 0.0f);
 | 
			
		||||
 | 
			
		||||
            b2BodyDef polygon_bd;
 | 
			
		||||
            polygon_bd.position.Set(20.0f, 10.0f);
 | 
			
		||||
            polygon_bd.type = b2_dynamicBody;
 | 
			
		||||
            polygon_bd.bullet = true;
 | 
			
		||||
            b2Body* polygon_body = m_world->CreateBody(&polygon_bd);
 | 
			
		||||
            polygon_body->CreateFixture(&polygon_shape, 2.0f);
 | 
			
		||||
 | 
			
		||||
            b2RevoluteJointDef rjd;
 | 
			
		||||
            rjd.Initialize(ground, polygon_body, b2Vec2(20.0f, 10.0f));
 | 
			
		||||
            rjd.lowerAngle = -0.25f * b2_pi;
 | 
			
		||||
            rjd.upperAngle = 0.0f * b2_pi;
 | 
			
		||||
            rjd.enableLimit = true;
 | 
			
		||||
            m_world->CreateJoint(&rjd);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Tests mass computation of a small object far from the origin
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bodyDef;
 | 
			
		||||
            bodyDef.type = b2_dynamicBody;
 | 
			
		||||
            b2Body* body = m_world->CreateBody(&bodyDef);
 | 
			
		||||
 | 
			
		||||
            b2PolygonShape polyShape;
 | 
			
		||||
            b2Vec2 verts[3];
 | 
			
		||||
            verts[0].Set( 17.63f, 36.31f );
 | 
			
		||||
            verts[1].Set( 17.52f, 36.69f );
 | 
			
		||||
            verts[2].Set( 17.19f, 36.36f );
 | 
			
		||||
            polyShape.Set(verts, 3);
 | 
			
		||||
 | 
			
		||||
            b2FixtureDef polyFixtureDef;
 | 
			
		||||
            polyFixtureDef.shape = &polyShape;
 | 
			
		||||
            polyFixtureDef.density = 1;
 | 
			
		||||
 | 
			
		||||
            body->CreateFixture(&polyFixtureDef);   //assertion hits inside here
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Keyboard(unsigned char key)
 | 
			
		||||
    {
 | 
			
		||||
        switch (key)
 | 
			
		||||
        {
 | 
			
		||||
        case 'l':
 | 
			
		||||
            m_joint->EnableLimit(!m_joint->IsLimitEnabled());
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case 'm':
 | 
			
		||||
            m_joint->EnableMotor(!m_joint->IsMotorEnabled());
 | 
			
		||||
            break;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Step(Settings* settings)
 | 
			
		||||
    {
 | 
			
		||||
        Test::Step(settings);
 | 
			
		||||
        m_debugDraw.DrawString(5, m_textLine, "Keys: (l) limits, (m) motor");
 | 
			
		||||
        m_textLine += 15;
 | 
			
		||||
 | 
			
		||||
        //if (m_stepCount == 360)
 | 
			
		||||
        //{
 | 
			
		||||
        //  m_ball->SetTransform(b2Vec2(0.0f, 0.5f), 0.0f);
 | 
			
		||||
        //}
 | 
			
		||||
 | 
			
		||||
        //float32 torque1 = m_joint1->GetMotorTorque();
 | 
			
		||||
        //m_debugDraw.DrawString(5, m_textLine, "Motor Torque = %4.0f, %4.0f : Motor Force = %4.0f", (float) torque1, (float) torque2, (float) force3);
 | 
			
		||||
        //m_textLine += 15;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new Revolute;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    b2Body* m_ball;
 | 
			
		||||
    b2RevoluteJoint* m_joint;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -1,101 +1,101 @@
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2011 Erin Catto http://box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef ROPE_H
 | 
			
		||||
#define ROPE_H
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
class Rope : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
    Rope()
 | 
			
		||||
    {
 | 
			
		||||
        const int32 N = 40;
 | 
			
		||||
        b2Vec2 vertices[N];
 | 
			
		||||
        float32 masses[N];
 | 
			
		||||
 | 
			
		||||
        for (int32 i = 0; i < N; ++i)
 | 
			
		||||
        {
 | 
			
		||||
            vertices[i].Set(0.0f, 20.0f - 0.25f * i);
 | 
			
		||||
            masses[i] = 1.0f;
 | 
			
		||||
        }
 | 
			
		||||
        masses[0] = 0.0f;
 | 
			
		||||
        masses[1] = 0.0f;
 | 
			
		||||
 | 
			
		||||
        b2RopeDef def;
 | 
			
		||||
        def.vertices = vertices;
 | 
			
		||||
        def.count = N;
 | 
			
		||||
        def.gravity.Set(0.0f, -10.0f);
 | 
			
		||||
        def.masses = masses;
 | 
			
		||||
        def.damping = 0.1f;
 | 
			
		||||
        def.k2 = 1.0f;
 | 
			
		||||
        def.k3 = 0.5f;
 | 
			
		||||
 | 
			
		||||
        m_rope.Initialize(&def);
 | 
			
		||||
 | 
			
		||||
        m_angle = 0.0f;
 | 
			
		||||
        m_rope.SetAngle(m_angle);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Keyboard(unsigned char key)
 | 
			
		||||
    {
 | 
			
		||||
        switch (key)
 | 
			
		||||
        {
 | 
			
		||||
        case 'q':
 | 
			
		||||
            m_angle = b2Max(-b2_pi, m_angle - 0.05f * b2_pi);
 | 
			
		||||
            m_rope.SetAngle(m_angle);
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case 'e':
 | 
			
		||||
            m_angle = b2Min(b2_pi, m_angle + 0.05f * b2_pi);
 | 
			
		||||
            m_rope.SetAngle(m_angle);
 | 
			
		||||
            break;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Step(Settings* settings)
 | 
			
		||||
    {
 | 
			
		||||
        float32 dt = settings->hz > 0.0f ? 1.0f / settings->hz : 0.0f;
 | 
			
		||||
 | 
			
		||||
        if (settings->pause == 1 && settings->singleStep == 0)
 | 
			
		||||
        {
 | 
			
		||||
            dt = 0.0f;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        m_rope.Step(dt, 1);
 | 
			
		||||
 | 
			
		||||
        Test::Step(settings);
 | 
			
		||||
 | 
			
		||||
        m_rope.Draw(&m_debugDraw);
 | 
			
		||||
 | 
			
		||||
        m_debugDraw.DrawString(5, m_textLine, "Press (q,e) to adjust target angle");
 | 
			
		||||
        m_textLine += 15;
 | 
			
		||||
        m_debugDraw.DrawString(5, m_textLine, "Target angle = %g degrees", m_angle * 180.0f / b2_pi);
 | 
			
		||||
        m_textLine += 15;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new Rope;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    b2Rope m_rope;
 | 
			
		||||
    float32 m_angle;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2011 Erin Catto http://box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef ROPE_H
 | 
			
		||||
#define ROPE_H
 | 
			
		||||
 | 
			
		||||
///
 | 
			
		||||
class Rope : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
    Rope()
 | 
			
		||||
    {
 | 
			
		||||
        const int32 N = 40;
 | 
			
		||||
        b2Vec2 vertices[N];
 | 
			
		||||
        float32 masses[N];
 | 
			
		||||
 | 
			
		||||
        for (int32 i = 0; i < N; ++i)
 | 
			
		||||
        {
 | 
			
		||||
            vertices[i].Set(0.0f, 20.0f - 0.25f * i);
 | 
			
		||||
            masses[i] = 1.0f;
 | 
			
		||||
        }
 | 
			
		||||
        masses[0] = 0.0f;
 | 
			
		||||
        masses[1] = 0.0f;
 | 
			
		||||
 | 
			
		||||
        b2RopeDef def;
 | 
			
		||||
        def.vertices = vertices;
 | 
			
		||||
        def.count = N;
 | 
			
		||||
        def.gravity.Set(0.0f, -10.0f);
 | 
			
		||||
        def.masses = masses;
 | 
			
		||||
        def.damping = 0.1f;
 | 
			
		||||
        def.k2 = 1.0f;
 | 
			
		||||
        def.k3 = 0.5f;
 | 
			
		||||
 | 
			
		||||
        m_rope.Initialize(&def);
 | 
			
		||||
 | 
			
		||||
        m_angle = 0.0f;
 | 
			
		||||
        m_rope.SetAngle(m_angle);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Keyboard(unsigned char key)
 | 
			
		||||
    {
 | 
			
		||||
        switch (key)
 | 
			
		||||
        {
 | 
			
		||||
        case 'q':
 | 
			
		||||
            m_angle = b2Max(-b2_pi, m_angle - 0.05f * b2_pi);
 | 
			
		||||
            m_rope.SetAngle(m_angle);
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case 'e':
 | 
			
		||||
            m_angle = b2Min(b2_pi, m_angle + 0.05f * b2_pi);
 | 
			
		||||
            m_rope.SetAngle(m_angle);
 | 
			
		||||
            break;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Step(Settings* settings)
 | 
			
		||||
    {
 | 
			
		||||
        float32 dt = settings->hz > 0.0f ? 1.0f / settings->hz : 0.0f;
 | 
			
		||||
 | 
			
		||||
        if (settings->pause == 1 && settings->singleStep == 0)
 | 
			
		||||
        {
 | 
			
		||||
            dt = 0.0f;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        m_rope.Step(dt, 1);
 | 
			
		||||
 | 
			
		||||
        Test::Step(settings);
 | 
			
		||||
 | 
			
		||||
        m_rope.Draw(&m_debugDraw);
 | 
			
		||||
 | 
			
		||||
        m_debugDraw.DrawString(5, m_textLine, "Press (q,e) to adjust target angle");
 | 
			
		||||
        m_textLine += 15;
 | 
			
		||||
        m_debugDraw.DrawString(5, m_textLine, "Target angle = %g degrees", m_angle * 180.0f / b2_pi);
 | 
			
		||||
        m_textLine += 15;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new Rope;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    b2Rope m_rope;
 | 
			
		||||
    float32 m_angle;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -1,145 +1,145 @@
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2006-2010 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef ROPE_JOINT_H
 | 
			
		||||
#define ROPE_JOINT_H
 | 
			
		||||
 | 
			
		||||
/// This test shows how a rope joint can be used to stabilize a chain of
 | 
			
		||||
/// bodies with a heavy payload. Notice that the rope joint just prevents
 | 
			
		||||
/// excessive stretching and has no other effect.
 | 
			
		||||
/// By disabling the rope joint you can see that the Box2D solver has trouble
 | 
			
		||||
/// supporting heavy bodies with light bodies. Try playing around with the
 | 
			
		||||
/// densities, time step, and iterations to see how they affect stability.
 | 
			
		||||
/// This test also shows how to use contact filtering. Filtering is configured
 | 
			
		||||
/// so that the payload does not collide with the chain.
 | 
			
		||||
class RopeJoint : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
    RopeJoint()
 | 
			
		||||
    {
 | 
			
		||||
        b2Body* ground = NULL;
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            ground = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2EdgeShape shape;
 | 
			
		||||
            shape.Set(b2Vec2(-40.0f, 0.0f), b2Vec2(40.0f, 0.0f));
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(0.5f, 0.125f);
 | 
			
		||||
 | 
			
		||||
            b2FixtureDef fd;
 | 
			
		||||
            fd.shape = &shape;
 | 
			
		||||
            fd.density = 20.0f;
 | 
			
		||||
            fd.friction = 0.2f;
 | 
			
		||||
            fd.filter.categoryBits = 0x0001;
 | 
			
		||||
            fd.filter.maskBits = 0xFFFF & ~0x0002;
 | 
			
		||||
 | 
			
		||||
            b2RevoluteJointDef jd;
 | 
			
		||||
            jd.collideConnected = false;
 | 
			
		||||
 | 
			
		||||
            const int32 N = 10;
 | 
			
		||||
            const float32 y = 15.0f;
 | 
			
		||||
            m_ropeDef.localAnchorA.Set(0.0f, y);
 | 
			
		||||
 | 
			
		||||
            b2Body* prevBody = ground;
 | 
			
		||||
            for (int32 i = 0; i < N; ++i)
 | 
			
		||||
            {
 | 
			
		||||
                b2BodyDef bd;
 | 
			
		||||
                bd.type = b2_dynamicBody;
 | 
			
		||||
                bd.position.Set(0.5f + 1.0f * i, y);
 | 
			
		||||
                if (i == N - 1)
 | 
			
		||||
                {
 | 
			
		||||
                    shape.SetAsBox(1.5f, 1.5f);
 | 
			
		||||
                    fd.density = 100.0f;
 | 
			
		||||
                    fd.filter.categoryBits = 0x0002;
 | 
			
		||||
                    bd.position.Set(1.0f * i, y);
 | 
			
		||||
                    bd.angularDamping = 0.4f;
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
                body->CreateFixture(&fd);
 | 
			
		||||
 | 
			
		||||
                b2Vec2 anchor(float32(i), y);
 | 
			
		||||
                jd.Initialize(prevBody, body, anchor);
 | 
			
		||||
                m_world->CreateJoint(&jd);
 | 
			
		||||
 | 
			
		||||
                prevBody = body;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            m_ropeDef.localAnchorB.SetZero();
 | 
			
		||||
 | 
			
		||||
            float32 extraLength = 0.01f;
 | 
			
		||||
            m_ropeDef.maxLength = N - 1.0f + extraLength;
 | 
			
		||||
            m_ropeDef.bodyB = prevBody;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            m_ropeDef.bodyA = ground;
 | 
			
		||||
            m_rope = m_world->CreateJoint(&m_ropeDef);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Keyboard(unsigned char key)
 | 
			
		||||
    {
 | 
			
		||||
        switch (key)
 | 
			
		||||
        {
 | 
			
		||||
        case 'j':
 | 
			
		||||
            if (m_rope)
 | 
			
		||||
            {
 | 
			
		||||
                m_world->DestroyJoint(m_rope);
 | 
			
		||||
                m_rope = NULL;
 | 
			
		||||
            }
 | 
			
		||||
            else
 | 
			
		||||
            {
 | 
			
		||||
                m_rope = m_world->CreateJoint(&m_ropeDef);
 | 
			
		||||
            }
 | 
			
		||||
            break;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Step(Settings* settings)
 | 
			
		||||
    {
 | 
			
		||||
        Test::Step(settings);
 | 
			
		||||
        m_debugDraw.DrawString(5, m_textLine, "Press (j) to toggle the rope joint.");
 | 
			
		||||
        m_textLine += 15;
 | 
			
		||||
        if (m_rope)
 | 
			
		||||
        {
 | 
			
		||||
            m_debugDraw.DrawString(5, m_textLine, "Rope ON");
 | 
			
		||||
        }
 | 
			
		||||
        else
 | 
			
		||||
        {
 | 
			
		||||
            m_debugDraw.DrawString(5, m_textLine, "Rope OFF");
 | 
			
		||||
        }
 | 
			
		||||
        m_textLine += 15;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new RopeJoint;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    b2RopeJointDef m_ropeDef;
 | 
			
		||||
    b2Joint* m_rope;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2006-2010 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef ROPE_JOINT_H
 | 
			
		||||
#define ROPE_JOINT_H
 | 
			
		||||
 | 
			
		||||
/// This test shows how a rope joint can be used to stabilize a chain of
 | 
			
		||||
/// bodies with a heavy payload. Notice that the rope joint just prevents
 | 
			
		||||
/// excessive stretching and has no other effect.
 | 
			
		||||
/// By disabling the rope joint you can see that the Box2D solver has trouble
 | 
			
		||||
/// supporting heavy bodies with light bodies. Try playing around with the
 | 
			
		||||
/// densities, time step, and iterations to see how they affect stability.
 | 
			
		||||
/// This test also shows how to use contact filtering. Filtering is configured
 | 
			
		||||
/// so that the payload does not collide with the chain.
 | 
			
		||||
class RopeJoint : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
    RopeJoint()
 | 
			
		||||
    {
 | 
			
		||||
        b2Body* ground = NULL;
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            ground = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2EdgeShape shape;
 | 
			
		||||
            shape.Set(b2Vec2(-40.0f, 0.0f), b2Vec2(40.0f, 0.0f));
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(0.5f, 0.125f);
 | 
			
		||||
 | 
			
		||||
            b2FixtureDef fd;
 | 
			
		||||
            fd.shape = &shape;
 | 
			
		||||
            fd.density = 20.0f;
 | 
			
		||||
            fd.friction = 0.2f;
 | 
			
		||||
            fd.filter.categoryBits = 0x0001;
 | 
			
		||||
            fd.filter.maskBits = 0xFFFF & ~0x0002;
 | 
			
		||||
 | 
			
		||||
            b2RevoluteJointDef jd;
 | 
			
		||||
            jd.collideConnected = false;
 | 
			
		||||
 | 
			
		||||
            const int32 N = 10;
 | 
			
		||||
            const float32 y = 15.0f;
 | 
			
		||||
            m_ropeDef.localAnchorA.Set(0.0f, y);
 | 
			
		||||
 | 
			
		||||
            b2Body* prevBody = ground;
 | 
			
		||||
            for (int32 i = 0; i < N; ++i)
 | 
			
		||||
            {
 | 
			
		||||
                b2BodyDef bd;
 | 
			
		||||
                bd.type = b2_dynamicBody;
 | 
			
		||||
                bd.position.Set(0.5f + 1.0f * i, y);
 | 
			
		||||
                if (i == N - 1)
 | 
			
		||||
                {
 | 
			
		||||
                    shape.SetAsBox(1.5f, 1.5f);
 | 
			
		||||
                    fd.density = 100.0f;
 | 
			
		||||
                    fd.filter.categoryBits = 0x0002;
 | 
			
		||||
                    bd.position.Set(1.0f * i, y);
 | 
			
		||||
                    bd.angularDamping = 0.4f;
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
                body->CreateFixture(&fd);
 | 
			
		||||
 | 
			
		||||
                b2Vec2 anchor(float32(i), y);
 | 
			
		||||
                jd.Initialize(prevBody, body, anchor);
 | 
			
		||||
                m_world->CreateJoint(&jd);
 | 
			
		||||
 | 
			
		||||
                prevBody = body;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            m_ropeDef.localAnchorB.SetZero();
 | 
			
		||||
 | 
			
		||||
            float32 extraLength = 0.01f;
 | 
			
		||||
            m_ropeDef.maxLength = N - 1.0f + extraLength;
 | 
			
		||||
            m_ropeDef.bodyB = prevBody;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            m_ropeDef.bodyA = ground;
 | 
			
		||||
            m_rope = m_world->CreateJoint(&m_ropeDef);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Keyboard(unsigned char key)
 | 
			
		||||
    {
 | 
			
		||||
        switch (key)
 | 
			
		||||
        {
 | 
			
		||||
        case 'j':
 | 
			
		||||
            if (m_rope)
 | 
			
		||||
            {
 | 
			
		||||
                m_world->DestroyJoint(m_rope);
 | 
			
		||||
                m_rope = NULL;
 | 
			
		||||
            }
 | 
			
		||||
            else
 | 
			
		||||
            {
 | 
			
		||||
                m_rope = m_world->CreateJoint(&m_ropeDef);
 | 
			
		||||
            }
 | 
			
		||||
            break;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Step(Settings* settings)
 | 
			
		||||
    {
 | 
			
		||||
        Test::Step(settings);
 | 
			
		||||
        m_debugDraw.DrawString(5, m_textLine, "Press (j) to toggle the rope joint.");
 | 
			
		||||
        m_textLine += 15;
 | 
			
		||||
        if (m_rope)
 | 
			
		||||
        {
 | 
			
		||||
            m_debugDraw.DrawString(5, m_textLine, "Rope ON");
 | 
			
		||||
        }
 | 
			
		||||
        else
 | 
			
		||||
        {
 | 
			
		||||
            m_debugDraw.DrawString(5, m_textLine, "Rope OFF");
 | 
			
		||||
        }
 | 
			
		||||
        m_textLine += 15;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new RopeJoint;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    b2RopeJointDef m_ropeDef;
 | 
			
		||||
    b2Joint* m_rope;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -1,181 +1,181 @@
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2008-2009 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef SENSOR_TEST_H
 | 
			
		||||
#define SENSOR_TEST_H
 | 
			
		||||
 | 
			
		||||
// This is used to test sensor shapes.
 | 
			
		||||
class SensorTest : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
 | 
			
		||||
    enum
 | 
			
		||||
    {
 | 
			
		||||
        e_count = 7
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    SensorTest()
 | 
			
		||||
    {
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            b2Body* ground = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            {
 | 
			
		||||
                b2EdgeShape shape;
 | 
			
		||||
                shape.Set(b2Vec2(-40.0f, 0.0f), b2Vec2(40.0f, 0.0f));
 | 
			
		||||
                ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
#if 0
 | 
			
		||||
            {
 | 
			
		||||
                b2FixtureDef sd;
 | 
			
		||||
                sd.SetAsBox(10.0f, 2.0f, b2Vec2(0.0f, 20.0f), 0.0f);
 | 
			
		||||
                sd.isSensor = true;
 | 
			
		||||
                m_sensor = ground->CreateFixture(&sd);
 | 
			
		||||
            }
 | 
			
		||||
#else
 | 
			
		||||
            {
 | 
			
		||||
                b2CircleShape shape;
 | 
			
		||||
                shape.m_radius = 5.0f;
 | 
			
		||||
                shape.m_p.Set(0.0f, 10.0f);
 | 
			
		||||
 | 
			
		||||
                b2FixtureDef fd;
 | 
			
		||||
                fd.shape = &shape;
 | 
			
		||||
                fd.isSensor = true;
 | 
			
		||||
                m_sensor = ground->CreateFixture(&fd);
 | 
			
		||||
            }
 | 
			
		||||
#endif
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2CircleShape shape;
 | 
			
		||||
            shape.m_radius = 1.0f;
 | 
			
		||||
 | 
			
		||||
            for (int32 i = 0; i < e_count; ++i)
 | 
			
		||||
            {
 | 
			
		||||
                b2BodyDef bd;
 | 
			
		||||
                bd.type = b2_dynamicBody;
 | 
			
		||||
                bd.position.Set(-10.0f + 3.0f * i, 20.0f);
 | 
			
		||||
                bd.userData = m_touching + i;
 | 
			
		||||
 | 
			
		||||
                m_touching[i] = false;
 | 
			
		||||
                m_bodies[i] = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
                m_bodies[i]->CreateFixture(&shape, 1.0f);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    // Implement contact listener.
 | 
			
		||||
    void BeginContact(b2Contact* contact)
 | 
			
		||||
    {
 | 
			
		||||
        b2Fixture* fixtureA = contact->GetFixtureA();
 | 
			
		||||
        b2Fixture* fixtureB = contact->GetFixtureB();
 | 
			
		||||
 | 
			
		||||
        if (fixtureA == m_sensor)
 | 
			
		||||
        {
 | 
			
		||||
            void* userData = fixtureB->GetBody()->GetUserData();
 | 
			
		||||
            if (userData)
 | 
			
		||||
            {
 | 
			
		||||
                bool* touching = (bool*)userData;
 | 
			
		||||
                *touching = true;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (fixtureB == m_sensor)
 | 
			
		||||
        {
 | 
			
		||||
            void* userData = fixtureA->GetBody()->GetUserData();
 | 
			
		||||
            if (userData)
 | 
			
		||||
            {
 | 
			
		||||
                bool* touching = (bool*)userData;
 | 
			
		||||
                *touching = true;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    // Implement contact listener.
 | 
			
		||||
    void EndContact(b2Contact* contact)
 | 
			
		||||
    {
 | 
			
		||||
        b2Fixture* fixtureA = contact->GetFixtureA();
 | 
			
		||||
        b2Fixture* fixtureB = contact->GetFixtureB();
 | 
			
		||||
 | 
			
		||||
        if (fixtureA == m_sensor)
 | 
			
		||||
        {
 | 
			
		||||
            void* userData = fixtureB->GetBody()->GetUserData();
 | 
			
		||||
            if (userData)
 | 
			
		||||
            {
 | 
			
		||||
                bool* touching = (bool*)userData;
 | 
			
		||||
                *touching = false;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (fixtureB == m_sensor)
 | 
			
		||||
        {
 | 
			
		||||
            void* userData = fixtureA->GetBody()->GetUserData();
 | 
			
		||||
            if (userData)
 | 
			
		||||
            {
 | 
			
		||||
                bool* touching = (bool*)userData;
 | 
			
		||||
                *touching = false;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Step(Settings* settings)
 | 
			
		||||
    {
 | 
			
		||||
        Test::Step(settings);
 | 
			
		||||
 | 
			
		||||
        // Traverse the contact results. Apply a force on shapes
 | 
			
		||||
        // that overlap the sensor.
 | 
			
		||||
        for (int32 i = 0; i < e_count; ++i)
 | 
			
		||||
        {
 | 
			
		||||
            if (m_touching[i] == false)
 | 
			
		||||
            {
 | 
			
		||||
                continue;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            b2Body* body = m_bodies[i];
 | 
			
		||||
            b2Body* ground = m_sensor->GetBody();
 | 
			
		||||
 | 
			
		||||
            b2CircleShape* circle = (b2CircleShape*)m_sensor->GetShape();
 | 
			
		||||
            b2Vec2 center = ground->GetWorldPoint(circle->m_p);
 | 
			
		||||
 | 
			
		||||
            b2Vec2 position = body->GetPosition();
 | 
			
		||||
 | 
			
		||||
            b2Vec2 d = center - position;
 | 
			
		||||
            if (d.LengthSquared() < FLT_EPSILON * FLT_EPSILON)
 | 
			
		||||
            {
 | 
			
		||||
                continue;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            d.Normalize();
 | 
			
		||||
            b2Vec2 F = 100.0f * d;
 | 
			
		||||
            body->ApplyForce(F, position);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new SensorTest;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    b2Fixture* m_sensor;
 | 
			
		||||
    b2Body* m_bodies[e_count];
 | 
			
		||||
    bool m_touching[e_count];
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2008-2009 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef SENSOR_TEST_H
 | 
			
		||||
#define SENSOR_TEST_H
 | 
			
		||||
 | 
			
		||||
// This is used to test sensor shapes.
 | 
			
		||||
class SensorTest : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
 | 
			
		||||
    enum
 | 
			
		||||
    {
 | 
			
		||||
        e_count = 7
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    SensorTest()
 | 
			
		||||
    {
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            b2Body* ground = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            {
 | 
			
		||||
                b2EdgeShape shape;
 | 
			
		||||
                shape.Set(b2Vec2(-40.0f, 0.0f), b2Vec2(40.0f, 0.0f));
 | 
			
		||||
                ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
#if 0
 | 
			
		||||
            {
 | 
			
		||||
                b2FixtureDef sd;
 | 
			
		||||
                sd.SetAsBox(10.0f, 2.0f, b2Vec2(0.0f, 20.0f), 0.0f);
 | 
			
		||||
                sd.isSensor = true;
 | 
			
		||||
                m_sensor = ground->CreateFixture(&sd);
 | 
			
		||||
            }
 | 
			
		||||
#else
 | 
			
		||||
            {
 | 
			
		||||
                b2CircleShape shape;
 | 
			
		||||
                shape.m_radius = 5.0f;
 | 
			
		||||
                shape.m_p.Set(0.0f, 10.0f);
 | 
			
		||||
 | 
			
		||||
                b2FixtureDef fd;
 | 
			
		||||
                fd.shape = &shape;
 | 
			
		||||
                fd.isSensor = true;
 | 
			
		||||
                m_sensor = ground->CreateFixture(&fd);
 | 
			
		||||
            }
 | 
			
		||||
#endif
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2CircleShape shape;
 | 
			
		||||
            shape.m_radius = 1.0f;
 | 
			
		||||
 | 
			
		||||
            for (int32 i = 0; i < e_count; ++i)
 | 
			
		||||
            {
 | 
			
		||||
                b2BodyDef bd;
 | 
			
		||||
                bd.type = b2_dynamicBody;
 | 
			
		||||
                bd.position.Set(-10.0f + 3.0f * i, 20.0f);
 | 
			
		||||
                bd.userData = m_touching + i;
 | 
			
		||||
 | 
			
		||||
                m_touching[i] = false;
 | 
			
		||||
                m_bodies[i] = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
                m_bodies[i]->CreateFixture(&shape, 1.0f);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    // Implement contact listener.
 | 
			
		||||
    void BeginContact(b2Contact* contact)
 | 
			
		||||
    {
 | 
			
		||||
        b2Fixture* fixtureA = contact->GetFixtureA();
 | 
			
		||||
        b2Fixture* fixtureB = contact->GetFixtureB();
 | 
			
		||||
 | 
			
		||||
        if (fixtureA == m_sensor)
 | 
			
		||||
        {
 | 
			
		||||
            void* userData = fixtureB->GetBody()->GetUserData();
 | 
			
		||||
            if (userData)
 | 
			
		||||
            {
 | 
			
		||||
                bool* touching = (bool*)userData;
 | 
			
		||||
                *touching = true;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (fixtureB == m_sensor)
 | 
			
		||||
        {
 | 
			
		||||
            void* userData = fixtureA->GetBody()->GetUserData();
 | 
			
		||||
            if (userData)
 | 
			
		||||
            {
 | 
			
		||||
                bool* touching = (bool*)userData;
 | 
			
		||||
                *touching = true;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    // Implement contact listener.
 | 
			
		||||
    void EndContact(b2Contact* contact)
 | 
			
		||||
    {
 | 
			
		||||
        b2Fixture* fixtureA = contact->GetFixtureA();
 | 
			
		||||
        b2Fixture* fixtureB = contact->GetFixtureB();
 | 
			
		||||
 | 
			
		||||
        if (fixtureA == m_sensor)
 | 
			
		||||
        {
 | 
			
		||||
            void* userData = fixtureB->GetBody()->GetUserData();
 | 
			
		||||
            if (userData)
 | 
			
		||||
            {
 | 
			
		||||
                bool* touching = (bool*)userData;
 | 
			
		||||
                *touching = false;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (fixtureB == m_sensor)
 | 
			
		||||
        {
 | 
			
		||||
            void* userData = fixtureA->GetBody()->GetUserData();
 | 
			
		||||
            if (userData)
 | 
			
		||||
            {
 | 
			
		||||
                bool* touching = (bool*)userData;
 | 
			
		||||
                *touching = false;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Step(Settings* settings)
 | 
			
		||||
    {
 | 
			
		||||
        Test::Step(settings);
 | 
			
		||||
 | 
			
		||||
        // Traverse the contact results. Apply a force on shapes
 | 
			
		||||
        // that overlap the sensor.
 | 
			
		||||
        for (int32 i = 0; i < e_count; ++i)
 | 
			
		||||
        {
 | 
			
		||||
            if (m_touching[i] == false)
 | 
			
		||||
            {
 | 
			
		||||
                continue;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            b2Body* body = m_bodies[i];
 | 
			
		||||
            b2Body* ground = m_sensor->GetBody();
 | 
			
		||||
 | 
			
		||||
            b2CircleShape* circle = (b2CircleShape*)m_sensor->GetShape();
 | 
			
		||||
            b2Vec2 center = ground->GetWorldPoint(circle->m_p);
 | 
			
		||||
 | 
			
		||||
            b2Vec2 position = body->GetPosition();
 | 
			
		||||
 | 
			
		||||
            b2Vec2 d = center - position;
 | 
			
		||||
            if (d.LengthSquared() < FLT_EPSILON * FLT_EPSILON)
 | 
			
		||||
            {
 | 
			
		||||
                continue;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            d.Normalize();
 | 
			
		||||
            b2Vec2 F = 100.0f * d;
 | 
			
		||||
            body->ApplyForce(F, position);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new SensorTest;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    b2Fixture* m_sensor;
 | 
			
		||||
    b2Body* m_bodies[e_count];
 | 
			
		||||
    bool m_touching[e_count];
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -1,105 +1,105 @@
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2008-2009 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef SHAPE_EDITING_H
 | 
			
		||||
#define SHAPE_EDITING_H
 | 
			
		||||
 | 
			
		||||
class ShapeEditing : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
 | 
			
		||||
    ShapeEditing()
 | 
			
		||||
    {
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            b2Body* ground = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2EdgeShape shape;
 | 
			
		||||
            shape.Set(b2Vec2(-40.0f, 0.0f), b2Vec2(40.0f, 0.0f));
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        b2BodyDef bd;
 | 
			
		||||
        bd.type = b2_dynamicBody;
 | 
			
		||||
        bd.position.Set(0.0f, 10.0f);
 | 
			
		||||
        m_body = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
        b2PolygonShape shape;
 | 
			
		||||
        shape.SetAsBox(4.0f, 4.0f, b2Vec2(0.0f, 0.0f), 0.0f);
 | 
			
		||||
        m_fixture1 = m_body->CreateFixture(&shape, 10.0f);
 | 
			
		||||
 | 
			
		||||
        m_fixture2 = NULL;
 | 
			
		||||
 | 
			
		||||
        m_sensor = false;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Keyboard(unsigned char key)
 | 
			
		||||
    {
 | 
			
		||||
        switch (key)
 | 
			
		||||
        {
 | 
			
		||||
        case 'c':
 | 
			
		||||
            if (m_fixture2 == NULL)
 | 
			
		||||
            {
 | 
			
		||||
                b2CircleShape shape;
 | 
			
		||||
                shape.m_radius = 3.0f;
 | 
			
		||||
                shape.m_p.Set(0.5f, -4.0f);
 | 
			
		||||
                m_fixture2 = m_body->CreateFixture(&shape, 10.0f);
 | 
			
		||||
                m_body->SetAwake(true);
 | 
			
		||||
            }
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case 'd':
 | 
			
		||||
            if (m_fixture2 != NULL)
 | 
			
		||||
            {
 | 
			
		||||
                m_body->DestroyFixture(m_fixture2);
 | 
			
		||||
                m_fixture2 = NULL;
 | 
			
		||||
                m_body->SetAwake(true);
 | 
			
		||||
            }
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case 's':
 | 
			
		||||
            if (m_fixture2 != NULL)
 | 
			
		||||
            {
 | 
			
		||||
                m_sensor = !m_sensor;
 | 
			
		||||
                m_fixture2->SetSensor(m_sensor);
 | 
			
		||||
            }
 | 
			
		||||
            break;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Step(Settings* settings)
 | 
			
		||||
    {
 | 
			
		||||
        Test::Step(settings);
 | 
			
		||||
        m_debugDraw.DrawString(5, m_textLine, "Press: (c) create a shape, (d) destroy a shape.");
 | 
			
		||||
        m_textLine += 15;
 | 
			
		||||
        m_debugDraw.DrawString(5, m_textLine, "sensor = %d", m_sensor);
 | 
			
		||||
        m_textLine += 15;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new ShapeEditing;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    b2Body* m_body;
 | 
			
		||||
    b2Fixture* m_fixture1;
 | 
			
		||||
    b2Fixture* m_fixture2;
 | 
			
		||||
    bool m_sensor;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2008-2009 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef SHAPE_EDITING_H
 | 
			
		||||
#define SHAPE_EDITING_H
 | 
			
		||||
 | 
			
		||||
class ShapeEditing : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
 | 
			
		||||
    ShapeEditing()
 | 
			
		||||
    {
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            b2Body* ground = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2EdgeShape shape;
 | 
			
		||||
            shape.Set(b2Vec2(-40.0f, 0.0f), b2Vec2(40.0f, 0.0f));
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        b2BodyDef bd;
 | 
			
		||||
        bd.type = b2_dynamicBody;
 | 
			
		||||
        bd.position.Set(0.0f, 10.0f);
 | 
			
		||||
        m_body = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
        b2PolygonShape shape;
 | 
			
		||||
        shape.SetAsBox(4.0f, 4.0f, b2Vec2(0.0f, 0.0f), 0.0f);
 | 
			
		||||
        m_fixture1 = m_body->CreateFixture(&shape, 10.0f);
 | 
			
		||||
 | 
			
		||||
        m_fixture2 = NULL;
 | 
			
		||||
 | 
			
		||||
        m_sensor = false;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Keyboard(unsigned char key)
 | 
			
		||||
    {
 | 
			
		||||
        switch (key)
 | 
			
		||||
        {
 | 
			
		||||
        case 'c':
 | 
			
		||||
            if (m_fixture2 == NULL)
 | 
			
		||||
            {
 | 
			
		||||
                b2CircleShape shape;
 | 
			
		||||
                shape.m_radius = 3.0f;
 | 
			
		||||
                shape.m_p.Set(0.5f, -4.0f);
 | 
			
		||||
                m_fixture2 = m_body->CreateFixture(&shape, 10.0f);
 | 
			
		||||
                m_body->SetAwake(true);
 | 
			
		||||
            }
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case 'd':
 | 
			
		||||
            if (m_fixture2 != NULL)
 | 
			
		||||
            {
 | 
			
		||||
                m_body->DestroyFixture(m_fixture2);
 | 
			
		||||
                m_fixture2 = NULL;
 | 
			
		||||
                m_body->SetAwake(true);
 | 
			
		||||
            }
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case 's':
 | 
			
		||||
            if (m_fixture2 != NULL)
 | 
			
		||||
            {
 | 
			
		||||
                m_sensor = !m_sensor;
 | 
			
		||||
                m_fixture2->SetSensor(m_sensor);
 | 
			
		||||
            }
 | 
			
		||||
            break;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Step(Settings* settings)
 | 
			
		||||
    {
 | 
			
		||||
        Test::Step(settings);
 | 
			
		||||
        m_debugDraw.DrawString(5, m_textLine, "Press: (c) create a shape, (d) destroy a shape.");
 | 
			
		||||
        m_textLine += 15;
 | 
			
		||||
        m_debugDraw.DrawString(5, m_textLine, "sensor = %d", m_sensor);
 | 
			
		||||
        m_textLine += 15;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new ShapeEditing;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    b2Body* m_body;
 | 
			
		||||
    b2Fixture* m_fixture1;
 | 
			
		||||
    b2Fixture* m_fixture2;
 | 
			
		||||
    bool m_sensor;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -1,156 +1,156 @@
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef SLIDER_CRANK_H
 | 
			
		||||
#define SLIDER_CRANK_H
 | 
			
		||||
 | 
			
		||||
// A motor driven slider crank with joint friction.
 | 
			
		||||
 | 
			
		||||
class SliderCrank : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
    SliderCrank()
 | 
			
		||||
    {
 | 
			
		||||
        b2Body* ground = NULL;
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            ground = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2EdgeShape shape;
 | 
			
		||||
            shape.Set(b2Vec2(-40.0f, 0.0f), b2Vec2(40.0f, 0.0f));
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2Body* prevBody = ground;
 | 
			
		||||
 | 
			
		||||
            // Define crank.
 | 
			
		||||
            {
 | 
			
		||||
                b2PolygonShape shape;
 | 
			
		||||
                shape.SetAsBox(0.5f, 2.0f);
 | 
			
		||||
 | 
			
		||||
                b2BodyDef bd;
 | 
			
		||||
                bd.type = b2_dynamicBody;
 | 
			
		||||
                bd.position.Set(0.0f, 7.0f);
 | 
			
		||||
                b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
                body->CreateFixture(&shape, 2.0f);
 | 
			
		||||
 | 
			
		||||
                b2RevoluteJointDef rjd;
 | 
			
		||||
                rjd.Initialize(prevBody, body, b2Vec2(0.0f, 5.0f));
 | 
			
		||||
                rjd.motorSpeed = 1.0f * b2_pi;
 | 
			
		||||
                rjd.maxMotorTorque = 10000.0f;
 | 
			
		||||
                rjd.enableMotor = true;
 | 
			
		||||
                m_joint1 = (b2RevoluteJoint*)m_world->CreateJoint(&rjd);
 | 
			
		||||
 | 
			
		||||
                prevBody = body;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            // Define follower.
 | 
			
		||||
            {
 | 
			
		||||
                b2PolygonShape shape;
 | 
			
		||||
                shape.SetAsBox(0.5f, 4.0f);
 | 
			
		||||
 | 
			
		||||
                b2BodyDef bd;
 | 
			
		||||
                bd.type = b2_dynamicBody;
 | 
			
		||||
                bd.position.Set(0.0f, 13.0f);
 | 
			
		||||
                b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
                body->CreateFixture(&shape, 2.0f);
 | 
			
		||||
 | 
			
		||||
                b2RevoluteJointDef rjd;
 | 
			
		||||
                rjd.Initialize(prevBody, body, b2Vec2(0.0f, 9.0f));
 | 
			
		||||
                rjd.enableMotor = false;
 | 
			
		||||
                m_world->CreateJoint(&rjd);
 | 
			
		||||
 | 
			
		||||
                prevBody = body;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            // Define piston
 | 
			
		||||
            {
 | 
			
		||||
                b2PolygonShape shape;
 | 
			
		||||
                shape.SetAsBox(1.5f, 1.5f);
 | 
			
		||||
 | 
			
		||||
                b2BodyDef bd;
 | 
			
		||||
                bd.type = b2_dynamicBody;
 | 
			
		||||
                bd.fixedRotation = true;
 | 
			
		||||
                bd.position.Set(0.0f, 17.0f);
 | 
			
		||||
                b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
                body->CreateFixture(&shape, 2.0f);
 | 
			
		||||
 | 
			
		||||
                b2RevoluteJointDef rjd;
 | 
			
		||||
                rjd.Initialize(prevBody, body, b2Vec2(0.0f, 17.0f));
 | 
			
		||||
                m_world->CreateJoint(&rjd);
 | 
			
		||||
 | 
			
		||||
                b2PrismaticJointDef pjd;
 | 
			
		||||
                pjd.Initialize(ground, body, b2Vec2(0.0f, 17.0f), b2Vec2(0.0f, 1.0f));
 | 
			
		||||
 | 
			
		||||
                pjd.maxMotorForce = 1000.0f;
 | 
			
		||||
                pjd.enableMotor = true;
 | 
			
		||||
 | 
			
		||||
                m_joint2 = (b2PrismaticJoint*)m_world->CreateJoint(&pjd);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            // Create a payload
 | 
			
		||||
            {
 | 
			
		||||
                b2PolygonShape shape;
 | 
			
		||||
                shape.SetAsBox(1.5f, 1.5f);
 | 
			
		||||
 | 
			
		||||
                b2BodyDef bd;
 | 
			
		||||
                bd.type = b2_dynamicBody;
 | 
			
		||||
                bd.position.Set(0.0f, 23.0f);
 | 
			
		||||
                b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
                body->CreateFixture(&shape, 2.0f);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Keyboard(unsigned char key)
 | 
			
		||||
    {
 | 
			
		||||
        switch (key)
 | 
			
		||||
        {
 | 
			
		||||
        case 'f':
 | 
			
		||||
            m_joint2->EnableMotor(!m_joint2->IsMotorEnabled());
 | 
			
		||||
            m_joint2->GetBodyB()->SetAwake(true);
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case 'm':
 | 
			
		||||
            m_joint1->EnableMotor(!m_joint1->IsMotorEnabled());
 | 
			
		||||
            m_joint1->GetBodyB()->SetAwake(true);
 | 
			
		||||
            break;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Step(Settings* settings)
 | 
			
		||||
    {
 | 
			
		||||
        Test::Step(settings);
 | 
			
		||||
        m_debugDraw.DrawString(5, m_textLine, "Keys: (f) toggle friction, (m) toggle motor");
 | 
			
		||||
        m_textLine += 15;
 | 
			
		||||
        float32 torque = m_joint1->GetMotorTorque(settings->hz);
 | 
			
		||||
        m_debugDraw.DrawString(5, m_textLine, "Motor Torque = %5.0f", (float) torque);
 | 
			
		||||
        m_textLine += 15;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new SliderCrank;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    b2RevoluteJoint* m_joint1;
 | 
			
		||||
    b2PrismaticJoint* m_joint2;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef SLIDER_CRANK_H
 | 
			
		||||
#define SLIDER_CRANK_H
 | 
			
		||||
 | 
			
		||||
// A motor driven slider crank with joint friction.
 | 
			
		||||
 | 
			
		||||
class SliderCrank : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
    SliderCrank()
 | 
			
		||||
    {
 | 
			
		||||
        b2Body* ground = NULL;
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            ground = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2EdgeShape shape;
 | 
			
		||||
            shape.Set(b2Vec2(-40.0f, 0.0f), b2Vec2(40.0f, 0.0f));
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2Body* prevBody = ground;
 | 
			
		||||
 | 
			
		||||
            // Define crank.
 | 
			
		||||
            {
 | 
			
		||||
                b2PolygonShape shape;
 | 
			
		||||
                shape.SetAsBox(0.5f, 2.0f);
 | 
			
		||||
 | 
			
		||||
                b2BodyDef bd;
 | 
			
		||||
                bd.type = b2_dynamicBody;
 | 
			
		||||
                bd.position.Set(0.0f, 7.0f);
 | 
			
		||||
                b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
                body->CreateFixture(&shape, 2.0f);
 | 
			
		||||
 | 
			
		||||
                b2RevoluteJointDef rjd;
 | 
			
		||||
                rjd.Initialize(prevBody, body, b2Vec2(0.0f, 5.0f));
 | 
			
		||||
                rjd.motorSpeed = 1.0f * b2_pi;
 | 
			
		||||
                rjd.maxMotorTorque = 10000.0f;
 | 
			
		||||
                rjd.enableMotor = true;
 | 
			
		||||
                m_joint1 = (b2RevoluteJoint*)m_world->CreateJoint(&rjd);
 | 
			
		||||
 | 
			
		||||
                prevBody = body;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            // Define follower.
 | 
			
		||||
            {
 | 
			
		||||
                b2PolygonShape shape;
 | 
			
		||||
                shape.SetAsBox(0.5f, 4.0f);
 | 
			
		||||
 | 
			
		||||
                b2BodyDef bd;
 | 
			
		||||
                bd.type = b2_dynamicBody;
 | 
			
		||||
                bd.position.Set(0.0f, 13.0f);
 | 
			
		||||
                b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
                body->CreateFixture(&shape, 2.0f);
 | 
			
		||||
 | 
			
		||||
                b2RevoluteJointDef rjd;
 | 
			
		||||
                rjd.Initialize(prevBody, body, b2Vec2(0.0f, 9.0f));
 | 
			
		||||
                rjd.enableMotor = false;
 | 
			
		||||
                m_world->CreateJoint(&rjd);
 | 
			
		||||
 | 
			
		||||
                prevBody = body;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            // Define piston
 | 
			
		||||
            {
 | 
			
		||||
                b2PolygonShape shape;
 | 
			
		||||
                shape.SetAsBox(1.5f, 1.5f);
 | 
			
		||||
 | 
			
		||||
                b2BodyDef bd;
 | 
			
		||||
                bd.type = b2_dynamicBody;
 | 
			
		||||
                bd.fixedRotation = true;
 | 
			
		||||
                bd.position.Set(0.0f, 17.0f);
 | 
			
		||||
                b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
                body->CreateFixture(&shape, 2.0f);
 | 
			
		||||
 | 
			
		||||
                b2RevoluteJointDef rjd;
 | 
			
		||||
                rjd.Initialize(prevBody, body, b2Vec2(0.0f, 17.0f));
 | 
			
		||||
                m_world->CreateJoint(&rjd);
 | 
			
		||||
 | 
			
		||||
                b2PrismaticJointDef pjd;
 | 
			
		||||
                pjd.Initialize(ground, body, b2Vec2(0.0f, 17.0f), b2Vec2(0.0f, 1.0f));
 | 
			
		||||
 | 
			
		||||
                pjd.maxMotorForce = 1000.0f;
 | 
			
		||||
                pjd.enableMotor = true;
 | 
			
		||||
 | 
			
		||||
                m_joint2 = (b2PrismaticJoint*)m_world->CreateJoint(&pjd);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            // Create a payload
 | 
			
		||||
            {
 | 
			
		||||
                b2PolygonShape shape;
 | 
			
		||||
                shape.SetAsBox(1.5f, 1.5f);
 | 
			
		||||
 | 
			
		||||
                b2BodyDef bd;
 | 
			
		||||
                bd.type = b2_dynamicBody;
 | 
			
		||||
                bd.position.Set(0.0f, 23.0f);
 | 
			
		||||
                b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
                body->CreateFixture(&shape, 2.0f);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Keyboard(unsigned char key)
 | 
			
		||||
    {
 | 
			
		||||
        switch (key)
 | 
			
		||||
        {
 | 
			
		||||
        case 'f':
 | 
			
		||||
            m_joint2->EnableMotor(!m_joint2->IsMotorEnabled());
 | 
			
		||||
            m_joint2->GetBodyB()->SetAwake(true);
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case 'm':
 | 
			
		||||
            m_joint1->EnableMotor(!m_joint1->IsMotorEnabled());
 | 
			
		||||
            m_joint1->GetBodyB()->SetAwake(true);
 | 
			
		||||
            break;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Step(Settings* settings)
 | 
			
		||||
    {
 | 
			
		||||
        Test::Step(settings);
 | 
			
		||||
        m_debugDraw.DrawString(5, m_textLine, "Keys: (f) toggle friction, (m) toggle motor");
 | 
			
		||||
        m_textLine += 15;
 | 
			
		||||
        float32 torque = m_joint1->GetMotorTorque(settings->hz);
 | 
			
		||||
        m_debugDraw.DrawString(5, m_textLine, "Motor Torque = %5.0f", (float) torque);
 | 
			
		||||
        m_textLine += 15;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new SliderCrank;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    b2RevoluteJoint* m_joint1;
 | 
			
		||||
    b2PrismaticJoint* m_joint2;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -1,86 +1,86 @@
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef SPHERE_STACK_H
 | 
			
		||||
#define SPHERE_STACK_H
 | 
			
		||||
 | 
			
		||||
class SphereStack : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
 | 
			
		||||
    enum
 | 
			
		||||
    {
 | 
			
		||||
        e_count = 10
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    SphereStack()
 | 
			
		||||
    {
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            b2Body* ground = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2EdgeShape shape;
 | 
			
		||||
            shape.Set(b2Vec2(-40.0f, 0.0f), b2Vec2(40.0f, 0.0f));
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2CircleShape shape;
 | 
			
		||||
            shape.m_radius = 1.0f;
 | 
			
		||||
 | 
			
		||||
            for (int32 i = 0; i < e_count; ++i)
 | 
			
		||||
            {
 | 
			
		||||
                b2BodyDef bd;
 | 
			
		||||
                bd.type = b2_dynamicBody;
 | 
			
		||||
                bd.position.Set(0.0, 4.0f + 3.0f * i);
 | 
			
		||||
 | 
			
		||||
                m_bodies[i] = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
                m_bodies[i]->CreateFixture(&shape, 1.0f);
 | 
			
		||||
 | 
			
		||||
                m_bodies[i]->SetLinearVelocity(b2Vec2(0.0f, -50.0f));
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Step(Settings* settings)
 | 
			
		||||
    {
 | 
			
		||||
        Test::Step(settings);
 | 
			
		||||
 | 
			
		||||
        //for (int32 i = 0; i < e_count; ++i)
 | 
			
		||||
        //{
 | 
			
		||||
        //  printf("%g ", m_bodies[i]->GetWorldCenter().y);
 | 
			
		||||
        //}
 | 
			
		||||
 | 
			
		||||
        //for (int32 i = 0; i < e_count; ++i)
 | 
			
		||||
        //{
 | 
			
		||||
        //  printf("%g ", m_bodies[i]->GetLinearVelocity().y);
 | 
			
		||||
        //}
 | 
			
		||||
 | 
			
		||||
        //printf("\n");
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new SphereStack;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    b2Body* m_bodies[e_count];
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef SPHERE_STACK_H
 | 
			
		||||
#define SPHERE_STACK_H
 | 
			
		||||
 | 
			
		||||
class SphereStack : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
 | 
			
		||||
    enum
 | 
			
		||||
    {
 | 
			
		||||
        e_count = 10
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    SphereStack()
 | 
			
		||||
    {
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            b2Body* ground = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2EdgeShape shape;
 | 
			
		||||
            shape.Set(b2Vec2(-40.0f, 0.0f), b2Vec2(40.0f, 0.0f));
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2CircleShape shape;
 | 
			
		||||
            shape.m_radius = 1.0f;
 | 
			
		||||
 | 
			
		||||
            for (int32 i = 0; i < e_count; ++i)
 | 
			
		||||
            {
 | 
			
		||||
                b2BodyDef bd;
 | 
			
		||||
                bd.type = b2_dynamicBody;
 | 
			
		||||
                bd.position.Set(0.0, 4.0f + 3.0f * i);
 | 
			
		||||
 | 
			
		||||
                m_bodies[i] = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
                m_bodies[i]->CreateFixture(&shape, 1.0f);
 | 
			
		||||
 | 
			
		||||
                m_bodies[i]->SetLinearVelocity(b2Vec2(0.0f, -50.0f));
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Step(Settings* settings)
 | 
			
		||||
    {
 | 
			
		||||
        Test::Step(settings);
 | 
			
		||||
 | 
			
		||||
        //for (int32 i = 0; i < e_count; ++i)
 | 
			
		||||
        //{
 | 
			
		||||
        //  printf("%g ", m_bodies[i]->GetWorldCenter().y);
 | 
			
		||||
        //}
 | 
			
		||||
 | 
			
		||||
        //for (int32 i = 0; i < e_count; ++i)
 | 
			
		||||
        //{
 | 
			
		||||
        //  printf("%g ", m_bodies[i]->GetLinearVelocity().y);
 | 
			
		||||
        //}
 | 
			
		||||
 | 
			
		||||
        //printf("\n");
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new SphereStack;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    b2Body* m_bodies[e_count];
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -1,125 +1,125 @@
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#include "../Framework/Test.h"
 | 
			
		||||
#include "../Framework/Render.h"
 | 
			
		||||
 | 
			
		||||
#ifdef __APPLE__
 | 
			
		||||
    #include <GLUT/glut.h>
 | 
			
		||||
#else
 | 
			
		||||
    #include "freeglut/freeglut.h"
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#include <cstring>
 | 
			
		||||
using namespace std;
 | 
			
		||||
 | 
			
		||||
#include "AddPair.h"
 | 
			
		||||
#include "ApplyForce.h"
 | 
			
		||||
#include "BodyTypes.h"
 | 
			
		||||
#include "Breakable.h"
 | 
			
		||||
#include "Bridge.h"
 | 
			
		||||
#include "BulletTest.h"
 | 
			
		||||
#include "Cantilever.h"
 | 
			
		||||
#include "Car.h"
 | 
			
		||||
#include "ContinuousTest.h"
 | 
			
		||||
#include "Chain.h"
 | 
			
		||||
#include "CharacterCollision.h"
 | 
			
		||||
#include "CollisionFiltering.h"
 | 
			
		||||
#include "CollisionProcessing.h"
 | 
			
		||||
#include "CompoundShapes.h"
 | 
			
		||||
#include "Confined.h"
 | 
			
		||||
#include "DistanceTest.h"
 | 
			
		||||
#include "Dominos.h"
 | 
			
		||||
#include "DumpShell.h"
 | 
			
		||||
#include "DynamicTreeTest.h"
 | 
			
		||||
#include "EdgeShapes.h"
 | 
			
		||||
#include "EdgeTest.h"
 | 
			
		||||
#include "Gears.h"
 | 
			
		||||
#include "OneSidedPlatform.h"
 | 
			
		||||
#include "Pinball.h"
 | 
			
		||||
#include "PolyCollision.h"
 | 
			
		||||
#include "PolyShapes.h"
 | 
			
		||||
#include "Prismatic.h"
 | 
			
		||||
#include "Pulleys.h"
 | 
			
		||||
#include "Pyramid.h"
 | 
			
		||||
#include "RayCast.h"
 | 
			
		||||
#include "Revolute.h"
 | 
			
		||||
//#include "Rope.h"
 | 
			
		||||
#include "RopeJoint.h"
 | 
			
		||||
#include "SensorTest.h"
 | 
			
		||||
#include "ShapeEditing.h"
 | 
			
		||||
#include "SliderCrank.h"
 | 
			
		||||
#include "SphereStack.h"
 | 
			
		||||
#include "TheoJansen.h"
 | 
			
		||||
#include "Tiles.h"
 | 
			
		||||
#include "TimeOfImpact.h"
 | 
			
		||||
#include "Tumbler.h"
 | 
			
		||||
#include "VaryingFriction.h"
 | 
			
		||||
#include "VaryingRestitution.h"
 | 
			
		||||
#include "VerticalStack.h"
 | 
			
		||||
#include "Web.h"
 | 
			
		||||
 | 
			
		||||
TestEntry g_testEntries[] =
 | 
			
		||||
{
 | 
			
		||||
    {"Tumbler", Tumbler::Create},
 | 
			
		||||
    {"Tiles", Tiles::Create},
 | 
			
		||||
    {"Dump Shell", DumpShell::Create},
 | 
			
		||||
    {"Gears", Gears::Create},
 | 
			
		||||
    {"Cantilever", Cantilever::Create},
 | 
			
		||||
    {"Varying Restitution", VaryingRestitution::Create},
 | 
			
		||||
    {"Character Collision", CharacterCollision::Create},
 | 
			
		||||
    {"Edge Test", EdgeTest::Create},
 | 
			
		||||
    {"Body Types", BodyTypes::Create},
 | 
			
		||||
    {"Shape Editing", ShapeEditing::Create},
 | 
			
		||||
    {"Car", Car::Create},
 | 
			
		||||
    {"Apply Force", ApplyForce::Create},
 | 
			
		||||
    {"Prismatic", Prismatic::Create},
 | 
			
		||||
    {"Vertical Stack", VerticalStack::Create},
 | 
			
		||||
    {"SphereStack", SphereStack::Create},
 | 
			
		||||
    {"Revolute", Revolute::Create},
 | 
			
		||||
    {"Pulleys", Pulleys::Create},
 | 
			
		||||
    {"Polygon Shapes", PolyShapes::Create},
 | 
			
		||||
    //{"Rope", Rope::Create},
 | 
			
		||||
    {"Web", Web::Create},
 | 
			
		||||
    {"RopeJoint", RopeJoint::Create},
 | 
			
		||||
    {"One-Sided Platform", OneSidedPlatform::Create},
 | 
			
		||||
    {"Pinball", Pinball::Create},
 | 
			
		||||
    {"Bullet Test", BulletTest::Create},
 | 
			
		||||
    {"Continuous Test", ContinuousTest::Create},
 | 
			
		||||
    {"Time of Impact", TimeOfImpact::Create},
 | 
			
		||||
    {"Ray-Cast", RayCast::Create},
 | 
			
		||||
    {"Confined", Confined::Create},
 | 
			
		||||
    {"Pyramid", Pyramid::Create},
 | 
			
		||||
    {"Theo Jansen's Walker", TheoJansen::Create},
 | 
			
		||||
    {"Edge Shapes", EdgeShapes::Create},
 | 
			
		||||
    {"PolyCollision", PolyCollision::Create},
 | 
			
		||||
    {"Bridge", Bridge::Create},
 | 
			
		||||
    {"Breakable", Breakable::Create},
 | 
			
		||||
    {"Chain", Chain::Create},
 | 
			
		||||
    {"Collision Filtering", CollisionFiltering::Create},
 | 
			
		||||
    {"Collision Processing", CollisionProcessing::Create},
 | 
			
		||||
    {"Compound Shapes", CompoundShapes::Create},
 | 
			
		||||
    {"Distance Test", DistanceTest::Create},
 | 
			
		||||
    {"Dominos", Dominos::Create},
 | 
			
		||||
    {"Dynamic Tree", DynamicTreeTest::Create},
 | 
			
		||||
    {"Sensor Test", SensorTest::Create},
 | 
			
		||||
    {"Slider Crank", SliderCrank::Create},
 | 
			
		||||
    {"Varying Friction", VaryingFriction::Create},
 | 
			
		||||
    {"Add Pair Stress Test", AddPair::Create},
 | 
			
		||||
    {NULL, NULL}
 | 
			
		||||
};
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#include "../Framework/Test.h"
 | 
			
		||||
#include "../Framework/Render.h"
 | 
			
		||||
 | 
			
		||||
#ifdef __APPLE__
 | 
			
		||||
    #include <GLUT/glut.h>
 | 
			
		||||
#else
 | 
			
		||||
    #include "freeglut/freeglut.h"
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#include <cstring>
 | 
			
		||||
using namespace std;
 | 
			
		||||
 | 
			
		||||
#include "AddPair.h"
 | 
			
		||||
#include "ApplyForce.h"
 | 
			
		||||
#include "BodyTypes.h"
 | 
			
		||||
#include "Breakable.h"
 | 
			
		||||
#include "Bridge.h"
 | 
			
		||||
#include "BulletTest.h"
 | 
			
		||||
#include "Cantilever.h"
 | 
			
		||||
#include "Car.h"
 | 
			
		||||
#include "ContinuousTest.h"
 | 
			
		||||
#include "Chain.h"
 | 
			
		||||
#include "CharacterCollision.h"
 | 
			
		||||
#include "CollisionFiltering.h"
 | 
			
		||||
#include "CollisionProcessing.h"
 | 
			
		||||
#include "CompoundShapes.h"
 | 
			
		||||
#include "Confined.h"
 | 
			
		||||
#include "DistanceTest.h"
 | 
			
		||||
#include "Dominos.h"
 | 
			
		||||
#include "DumpShell.h"
 | 
			
		||||
#include "DynamicTreeTest.h"
 | 
			
		||||
#include "EdgeShapes.h"
 | 
			
		||||
#include "EdgeTest.h"
 | 
			
		||||
#include "Gears.h"
 | 
			
		||||
#include "OneSidedPlatform.h"
 | 
			
		||||
#include "Pinball.h"
 | 
			
		||||
#include "PolyCollision.h"
 | 
			
		||||
#include "PolyShapes.h"
 | 
			
		||||
#include "Prismatic.h"
 | 
			
		||||
#include "Pulleys.h"
 | 
			
		||||
#include "Pyramid.h"
 | 
			
		||||
#include "RayCast.h"
 | 
			
		||||
#include "Revolute.h"
 | 
			
		||||
//#include "Rope.h"
 | 
			
		||||
#include "RopeJoint.h"
 | 
			
		||||
#include "SensorTest.h"
 | 
			
		||||
#include "ShapeEditing.h"
 | 
			
		||||
#include "SliderCrank.h"
 | 
			
		||||
#include "SphereStack.h"
 | 
			
		||||
#include "TheoJansen.h"
 | 
			
		||||
#include "Tiles.h"
 | 
			
		||||
#include "TimeOfImpact.h"
 | 
			
		||||
#include "Tumbler.h"
 | 
			
		||||
#include "VaryingFriction.h"
 | 
			
		||||
#include "VaryingRestitution.h"
 | 
			
		||||
#include "VerticalStack.h"
 | 
			
		||||
#include "Web.h"
 | 
			
		||||
 | 
			
		||||
TestEntry g_testEntries[] =
 | 
			
		||||
{
 | 
			
		||||
    {"Tumbler", Tumbler::Create},
 | 
			
		||||
    {"Tiles", Tiles::Create},
 | 
			
		||||
    {"Dump Shell", DumpShell::Create},
 | 
			
		||||
    {"Gears", Gears::Create},
 | 
			
		||||
    {"Cantilever", Cantilever::Create},
 | 
			
		||||
    {"Varying Restitution", VaryingRestitution::Create},
 | 
			
		||||
    {"Character Collision", CharacterCollision::Create},
 | 
			
		||||
    {"Edge Test", EdgeTest::Create},
 | 
			
		||||
    {"Body Types", BodyTypes::Create},
 | 
			
		||||
    {"Shape Editing", ShapeEditing::Create},
 | 
			
		||||
    {"Car", Car::Create},
 | 
			
		||||
    {"Apply Force", ApplyForce::Create},
 | 
			
		||||
    {"Prismatic", Prismatic::Create},
 | 
			
		||||
    {"Vertical Stack", VerticalStack::Create},
 | 
			
		||||
    {"SphereStack", SphereStack::Create},
 | 
			
		||||
    {"Revolute", Revolute::Create},
 | 
			
		||||
    {"Pulleys", Pulleys::Create},
 | 
			
		||||
    {"Polygon Shapes", PolyShapes::Create},
 | 
			
		||||
    //{"Rope", Rope::Create},
 | 
			
		||||
    {"Web", Web::Create},
 | 
			
		||||
    {"RopeJoint", RopeJoint::Create},
 | 
			
		||||
    {"One-Sided Platform", OneSidedPlatform::Create},
 | 
			
		||||
    {"Pinball", Pinball::Create},
 | 
			
		||||
    {"Bullet Test", BulletTest::Create},
 | 
			
		||||
    {"Continuous Test", ContinuousTest::Create},
 | 
			
		||||
    {"Time of Impact", TimeOfImpact::Create},
 | 
			
		||||
    {"Ray-Cast", RayCast::Create},
 | 
			
		||||
    {"Confined", Confined::Create},
 | 
			
		||||
    {"Pyramid", Pyramid::Create},
 | 
			
		||||
    {"Theo Jansen's Walker", TheoJansen::Create},
 | 
			
		||||
    {"Edge Shapes", EdgeShapes::Create},
 | 
			
		||||
    {"PolyCollision", PolyCollision::Create},
 | 
			
		||||
    {"Bridge", Bridge::Create},
 | 
			
		||||
    {"Breakable", Breakable::Create},
 | 
			
		||||
    {"Chain", Chain::Create},
 | 
			
		||||
    {"Collision Filtering", CollisionFiltering::Create},
 | 
			
		||||
    {"Collision Processing", CollisionProcessing::Create},
 | 
			
		||||
    {"Compound Shapes", CompoundShapes::Create},
 | 
			
		||||
    {"Distance Test", DistanceTest::Create},
 | 
			
		||||
    {"Dominos", Dominos::Create},
 | 
			
		||||
    {"Dynamic Tree", DynamicTreeTest::Create},
 | 
			
		||||
    {"Sensor Test", SensorTest::Create},
 | 
			
		||||
    {"Slider Crank", SliderCrank::Create},
 | 
			
		||||
    {"Varying Friction", VaryingFriction::Create},
 | 
			
		||||
    {"Add Pair Stress Test", AddPair::Create},
 | 
			
		||||
    {NULL, NULL}
 | 
			
		||||
};
 | 
			
		||||
 
 | 
			
		||||
@@ -1,256 +1,256 @@
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
// Inspired by a contribution by roman_m
 | 
			
		||||
// Dimensions scooped from APE (http://www.cove.org/ape/index.htm)
 | 
			
		||||
 | 
			
		||||
#ifndef THEO_JANSEN_H
 | 
			
		||||
#define THEO_JANSEN_H
 | 
			
		||||
 | 
			
		||||
class TheoJansen : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
 | 
			
		||||
    void CreateLeg(float32 s, const b2Vec2& wheelAnchor)
 | 
			
		||||
    {
 | 
			
		||||
        b2Vec2 p1(5.4f * s, -6.1f);
 | 
			
		||||
        b2Vec2 p2(7.2f * s, -1.2f);
 | 
			
		||||
        b2Vec2 p3(4.3f * s, -1.9f);
 | 
			
		||||
        b2Vec2 p4(3.1f * s, 0.8f);
 | 
			
		||||
        b2Vec2 p5(6.0f * s, 1.5f);
 | 
			
		||||
        b2Vec2 p6(2.5f * s, 3.7f);
 | 
			
		||||
 | 
			
		||||
        b2FixtureDef fd1, fd2;
 | 
			
		||||
        fd1.filter.groupIndex = -1;
 | 
			
		||||
        fd2.filter.groupIndex = -1;
 | 
			
		||||
        fd1.density = 1.0f;
 | 
			
		||||
        fd2.density = 1.0f;
 | 
			
		||||
 | 
			
		||||
        b2PolygonShape poly1, poly2;
 | 
			
		||||
 | 
			
		||||
        if (s > 0.0f)
 | 
			
		||||
        {
 | 
			
		||||
            b2Vec2 vertices[3];
 | 
			
		||||
 | 
			
		||||
            vertices[0] = p1;
 | 
			
		||||
            vertices[1] = p2;
 | 
			
		||||
            vertices[2] = p3;
 | 
			
		||||
            poly1.Set(vertices, 3);
 | 
			
		||||
 | 
			
		||||
            vertices[0] = b2Vec2_zero;
 | 
			
		||||
            vertices[1] = p5 - p4;
 | 
			
		||||
            vertices[2] = p6 - p4;
 | 
			
		||||
            poly2.Set(vertices, 3);
 | 
			
		||||
        }
 | 
			
		||||
        else
 | 
			
		||||
        {
 | 
			
		||||
            b2Vec2 vertices[3];
 | 
			
		||||
 | 
			
		||||
            vertices[0] = p1;
 | 
			
		||||
            vertices[1] = p3;
 | 
			
		||||
            vertices[2] = p2;
 | 
			
		||||
            poly1.Set(vertices, 3);
 | 
			
		||||
 | 
			
		||||
            vertices[0] = b2Vec2_zero;
 | 
			
		||||
            vertices[1] = p6 - p4;
 | 
			
		||||
            vertices[2] = p5 - p4;
 | 
			
		||||
            poly2.Set(vertices, 3);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        fd1.shape = &poly1;
 | 
			
		||||
        fd2.shape = &poly2;
 | 
			
		||||
 | 
			
		||||
        b2BodyDef bd1, bd2;
 | 
			
		||||
        bd1.type = b2_dynamicBody;
 | 
			
		||||
        bd2.type = b2_dynamicBody;
 | 
			
		||||
        bd1.position = m_offset;
 | 
			
		||||
        bd2.position = p4 + m_offset;
 | 
			
		||||
 | 
			
		||||
        bd1.angularDamping = 10.0f;
 | 
			
		||||
        bd2.angularDamping = 10.0f;
 | 
			
		||||
 | 
			
		||||
        b2Body* body1 = m_world->CreateBody(&bd1);
 | 
			
		||||
        b2Body* body2 = m_world->CreateBody(&bd2);
 | 
			
		||||
 | 
			
		||||
        body1->CreateFixture(&fd1);
 | 
			
		||||
        body2->CreateFixture(&fd2);
 | 
			
		||||
 | 
			
		||||
        b2DistanceJointDef djd;
 | 
			
		||||
 | 
			
		||||
        // Using a soft distance constraint can reduce some jitter.
 | 
			
		||||
        // It also makes the structure seem a bit more fluid by
 | 
			
		||||
        // acting like a suspension system.
 | 
			
		||||
        djd.dampingRatio = 0.5f;
 | 
			
		||||
        djd.frequencyHz = 10.0f;
 | 
			
		||||
 | 
			
		||||
        djd.Initialize(body1, body2, p2 + m_offset, p5 + m_offset);
 | 
			
		||||
        m_world->CreateJoint(&djd);
 | 
			
		||||
 | 
			
		||||
        djd.Initialize(body1, body2, p3 + m_offset, p4 + m_offset);
 | 
			
		||||
        m_world->CreateJoint(&djd);
 | 
			
		||||
 | 
			
		||||
        djd.Initialize(body1, m_wheel, p3 + m_offset, wheelAnchor + m_offset);
 | 
			
		||||
        m_world->CreateJoint(&djd);
 | 
			
		||||
 | 
			
		||||
        djd.Initialize(body2, m_wheel, p6 + m_offset, wheelAnchor + m_offset);
 | 
			
		||||
        m_world->CreateJoint(&djd);
 | 
			
		||||
 | 
			
		||||
        b2RevoluteJointDef rjd;
 | 
			
		||||
 | 
			
		||||
        rjd.Initialize(body2, m_chassis, p4 + m_offset);
 | 
			
		||||
        m_world->CreateJoint(&rjd);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    TheoJansen()
 | 
			
		||||
    {
 | 
			
		||||
        m_offset.Set(0.0f, 8.0f);
 | 
			
		||||
        m_motorSpeed = 2.0f;
 | 
			
		||||
        m_motorOn = true;
 | 
			
		||||
        b2Vec2 pivot(0.0f, 0.8f);
 | 
			
		||||
 | 
			
		||||
        // Ground
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            b2Body* ground = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2EdgeShape shape;
 | 
			
		||||
            shape.Set(b2Vec2(-50.0f, 0.0f), b2Vec2(50.0f, 0.0f));
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
 | 
			
		||||
            shape.Set(b2Vec2(-50.0f, 0.0f), b2Vec2(-50.0f, 10.0f));
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
 | 
			
		||||
            shape.Set(b2Vec2(50.0f, 0.0f), b2Vec2(50.0f, 10.0f));
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Balls
 | 
			
		||||
        for (int32 i = 0; i < 40; ++i)
 | 
			
		||||
        {
 | 
			
		||||
            b2CircleShape shape;
 | 
			
		||||
            shape.m_radius = 0.25f;
 | 
			
		||||
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
            bd.position.Set(-40.0f + 2.0f * i, 0.5f);
 | 
			
		||||
 | 
			
		||||
            b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
            body->CreateFixture(&shape, 1.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Chassis
 | 
			
		||||
        {
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(2.5f, 1.0f);
 | 
			
		||||
 | 
			
		||||
            b2FixtureDef sd;
 | 
			
		||||
            sd.density = 1.0f;
 | 
			
		||||
            sd.shape = &shape;
 | 
			
		||||
            sd.filter.groupIndex = -1;
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
            bd.position = pivot + m_offset;
 | 
			
		||||
            m_chassis = m_world->CreateBody(&bd);
 | 
			
		||||
            m_chassis->CreateFixture(&sd);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2CircleShape shape;
 | 
			
		||||
            shape.m_radius = 1.6f;
 | 
			
		||||
 | 
			
		||||
            b2FixtureDef sd;
 | 
			
		||||
            sd.density = 1.0f;
 | 
			
		||||
            sd.shape = &shape;
 | 
			
		||||
            sd.filter.groupIndex = -1;
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
            bd.position = pivot + m_offset;
 | 
			
		||||
            m_wheel = m_world->CreateBody(&bd);
 | 
			
		||||
            m_wheel->CreateFixture(&sd);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2RevoluteJointDef jd;
 | 
			
		||||
            jd.Initialize(m_wheel, m_chassis, pivot + m_offset);
 | 
			
		||||
            jd.collideConnected = false;
 | 
			
		||||
            jd.motorSpeed = m_motorSpeed;
 | 
			
		||||
            jd.maxMotorTorque = 400.0f;
 | 
			
		||||
            jd.enableMotor = m_motorOn;
 | 
			
		||||
            m_motorJoint = (b2RevoluteJoint*)m_world->CreateJoint(&jd);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        b2Vec2 wheelAnchor;
 | 
			
		||||
 | 
			
		||||
        wheelAnchor = pivot + b2Vec2(0.0f, -0.8f);
 | 
			
		||||
 | 
			
		||||
        CreateLeg(-1.0f, wheelAnchor);
 | 
			
		||||
        CreateLeg(1.0f, wheelAnchor);
 | 
			
		||||
 | 
			
		||||
        m_wheel->SetTransform(m_wheel->GetPosition(), 120.0f * b2_pi / 180.0f);
 | 
			
		||||
        CreateLeg(-1.0f, wheelAnchor);
 | 
			
		||||
        CreateLeg(1.0f, wheelAnchor);
 | 
			
		||||
 | 
			
		||||
        m_wheel->SetTransform(m_wheel->GetPosition(), -120.0f * b2_pi / 180.0f);
 | 
			
		||||
        CreateLeg(-1.0f, wheelAnchor);
 | 
			
		||||
        CreateLeg(1.0f, wheelAnchor);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Step(Settings* settings)
 | 
			
		||||
    {
 | 
			
		||||
        m_debugDraw.DrawString(5, m_textLine, "Keys: left = a, brake = s, right = d, toggle motor = m");
 | 
			
		||||
        m_textLine += 15;
 | 
			
		||||
 | 
			
		||||
        Test::Step(settings);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Keyboard(unsigned char key)
 | 
			
		||||
    {
 | 
			
		||||
        switch (key)
 | 
			
		||||
        {
 | 
			
		||||
        case 'a':
 | 
			
		||||
            m_motorJoint->SetMotorSpeed(-m_motorSpeed);
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case 's':
 | 
			
		||||
            m_motorJoint->SetMotorSpeed(0.0f);
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case 'd':
 | 
			
		||||
            m_motorJoint->SetMotorSpeed(m_motorSpeed);
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case 'm':
 | 
			
		||||
            m_motorJoint->EnableMotor(!m_motorJoint->IsMotorEnabled());
 | 
			
		||||
            break;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new TheoJansen;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    b2Vec2 m_offset;
 | 
			
		||||
    b2Body* m_chassis;
 | 
			
		||||
    b2Body* m_wheel;
 | 
			
		||||
    b2RevoluteJoint* m_motorJoint;
 | 
			
		||||
    bool m_motorOn;
 | 
			
		||||
    float32 m_motorSpeed;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif // THEO_JANSEN_H
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
// Inspired by a contribution by roman_m
 | 
			
		||||
// Dimensions scooped from APE (http://www.cove.org/ape/index.htm)
 | 
			
		||||
 | 
			
		||||
#ifndef THEO_JANSEN_H
 | 
			
		||||
#define THEO_JANSEN_H
 | 
			
		||||
 | 
			
		||||
class TheoJansen : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
 | 
			
		||||
    void CreateLeg(float32 s, const b2Vec2& wheelAnchor)
 | 
			
		||||
    {
 | 
			
		||||
        b2Vec2 p1(5.4f * s, -6.1f);
 | 
			
		||||
        b2Vec2 p2(7.2f * s, -1.2f);
 | 
			
		||||
        b2Vec2 p3(4.3f * s, -1.9f);
 | 
			
		||||
        b2Vec2 p4(3.1f * s, 0.8f);
 | 
			
		||||
        b2Vec2 p5(6.0f * s, 1.5f);
 | 
			
		||||
        b2Vec2 p6(2.5f * s, 3.7f);
 | 
			
		||||
 | 
			
		||||
        b2FixtureDef fd1, fd2;
 | 
			
		||||
        fd1.filter.groupIndex = -1;
 | 
			
		||||
        fd2.filter.groupIndex = -1;
 | 
			
		||||
        fd1.density = 1.0f;
 | 
			
		||||
        fd2.density = 1.0f;
 | 
			
		||||
 | 
			
		||||
        b2PolygonShape poly1, poly2;
 | 
			
		||||
 | 
			
		||||
        if (s > 0.0f)
 | 
			
		||||
        {
 | 
			
		||||
            b2Vec2 vertices[3];
 | 
			
		||||
 | 
			
		||||
            vertices[0] = p1;
 | 
			
		||||
            vertices[1] = p2;
 | 
			
		||||
            vertices[2] = p3;
 | 
			
		||||
            poly1.Set(vertices, 3);
 | 
			
		||||
 | 
			
		||||
            vertices[0] = b2Vec2_zero;
 | 
			
		||||
            vertices[1] = p5 - p4;
 | 
			
		||||
            vertices[2] = p6 - p4;
 | 
			
		||||
            poly2.Set(vertices, 3);
 | 
			
		||||
        }
 | 
			
		||||
        else
 | 
			
		||||
        {
 | 
			
		||||
            b2Vec2 vertices[3];
 | 
			
		||||
 | 
			
		||||
            vertices[0] = p1;
 | 
			
		||||
            vertices[1] = p3;
 | 
			
		||||
            vertices[2] = p2;
 | 
			
		||||
            poly1.Set(vertices, 3);
 | 
			
		||||
 | 
			
		||||
            vertices[0] = b2Vec2_zero;
 | 
			
		||||
            vertices[1] = p6 - p4;
 | 
			
		||||
            vertices[2] = p5 - p4;
 | 
			
		||||
            poly2.Set(vertices, 3);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        fd1.shape = &poly1;
 | 
			
		||||
        fd2.shape = &poly2;
 | 
			
		||||
 | 
			
		||||
        b2BodyDef bd1, bd2;
 | 
			
		||||
        bd1.type = b2_dynamicBody;
 | 
			
		||||
        bd2.type = b2_dynamicBody;
 | 
			
		||||
        bd1.position = m_offset;
 | 
			
		||||
        bd2.position = p4 + m_offset;
 | 
			
		||||
 | 
			
		||||
        bd1.angularDamping = 10.0f;
 | 
			
		||||
        bd2.angularDamping = 10.0f;
 | 
			
		||||
 | 
			
		||||
        b2Body* body1 = m_world->CreateBody(&bd1);
 | 
			
		||||
        b2Body* body2 = m_world->CreateBody(&bd2);
 | 
			
		||||
 | 
			
		||||
        body1->CreateFixture(&fd1);
 | 
			
		||||
        body2->CreateFixture(&fd2);
 | 
			
		||||
 | 
			
		||||
        b2DistanceJointDef djd;
 | 
			
		||||
 | 
			
		||||
        // Using a soft distance constraint can reduce some jitter.
 | 
			
		||||
        // It also makes the structure seem a bit more fluid by
 | 
			
		||||
        // acting like a suspension system.
 | 
			
		||||
        djd.dampingRatio = 0.5f;
 | 
			
		||||
        djd.frequencyHz = 10.0f;
 | 
			
		||||
 | 
			
		||||
        djd.Initialize(body1, body2, p2 + m_offset, p5 + m_offset);
 | 
			
		||||
        m_world->CreateJoint(&djd);
 | 
			
		||||
 | 
			
		||||
        djd.Initialize(body1, body2, p3 + m_offset, p4 + m_offset);
 | 
			
		||||
        m_world->CreateJoint(&djd);
 | 
			
		||||
 | 
			
		||||
        djd.Initialize(body1, m_wheel, p3 + m_offset, wheelAnchor + m_offset);
 | 
			
		||||
        m_world->CreateJoint(&djd);
 | 
			
		||||
 | 
			
		||||
        djd.Initialize(body2, m_wheel, p6 + m_offset, wheelAnchor + m_offset);
 | 
			
		||||
        m_world->CreateJoint(&djd);
 | 
			
		||||
 | 
			
		||||
        b2RevoluteJointDef rjd;
 | 
			
		||||
 | 
			
		||||
        rjd.Initialize(body2, m_chassis, p4 + m_offset);
 | 
			
		||||
        m_world->CreateJoint(&rjd);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    TheoJansen()
 | 
			
		||||
    {
 | 
			
		||||
        m_offset.Set(0.0f, 8.0f);
 | 
			
		||||
        m_motorSpeed = 2.0f;
 | 
			
		||||
        m_motorOn = true;
 | 
			
		||||
        b2Vec2 pivot(0.0f, 0.8f);
 | 
			
		||||
 | 
			
		||||
        // Ground
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            b2Body* ground = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2EdgeShape shape;
 | 
			
		||||
            shape.Set(b2Vec2(-50.0f, 0.0f), b2Vec2(50.0f, 0.0f));
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
 | 
			
		||||
            shape.Set(b2Vec2(-50.0f, 0.0f), b2Vec2(-50.0f, 10.0f));
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
 | 
			
		||||
            shape.Set(b2Vec2(50.0f, 0.0f), b2Vec2(50.0f, 10.0f));
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Balls
 | 
			
		||||
        for (int32 i = 0; i < 40; ++i)
 | 
			
		||||
        {
 | 
			
		||||
            b2CircleShape shape;
 | 
			
		||||
            shape.m_radius = 0.25f;
 | 
			
		||||
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
            bd.position.Set(-40.0f + 2.0f * i, 0.5f);
 | 
			
		||||
 | 
			
		||||
            b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
            body->CreateFixture(&shape, 1.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Chassis
 | 
			
		||||
        {
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(2.5f, 1.0f);
 | 
			
		||||
 | 
			
		||||
            b2FixtureDef sd;
 | 
			
		||||
            sd.density = 1.0f;
 | 
			
		||||
            sd.shape = &shape;
 | 
			
		||||
            sd.filter.groupIndex = -1;
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
            bd.position = pivot + m_offset;
 | 
			
		||||
            m_chassis = m_world->CreateBody(&bd);
 | 
			
		||||
            m_chassis->CreateFixture(&sd);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2CircleShape shape;
 | 
			
		||||
            shape.m_radius = 1.6f;
 | 
			
		||||
 | 
			
		||||
            b2FixtureDef sd;
 | 
			
		||||
            sd.density = 1.0f;
 | 
			
		||||
            sd.shape = &shape;
 | 
			
		||||
            sd.filter.groupIndex = -1;
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
            bd.position = pivot + m_offset;
 | 
			
		||||
            m_wheel = m_world->CreateBody(&bd);
 | 
			
		||||
            m_wheel->CreateFixture(&sd);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2RevoluteJointDef jd;
 | 
			
		||||
            jd.Initialize(m_wheel, m_chassis, pivot + m_offset);
 | 
			
		||||
            jd.collideConnected = false;
 | 
			
		||||
            jd.motorSpeed = m_motorSpeed;
 | 
			
		||||
            jd.maxMotorTorque = 400.0f;
 | 
			
		||||
            jd.enableMotor = m_motorOn;
 | 
			
		||||
            m_motorJoint = (b2RevoluteJoint*)m_world->CreateJoint(&jd);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        b2Vec2 wheelAnchor;
 | 
			
		||||
 | 
			
		||||
        wheelAnchor = pivot + b2Vec2(0.0f, -0.8f);
 | 
			
		||||
 | 
			
		||||
        CreateLeg(-1.0f, wheelAnchor);
 | 
			
		||||
        CreateLeg(1.0f, wheelAnchor);
 | 
			
		||||
 | 
			
		||||
        m_wheel->SetTransform(m_wheel->GetPosition(), 120.0f * b2_pi / 180.0f);
 | 
			
		||||
        CreateLeg(-1.0f, wheelAnchor);
 | 
			
		||||
        CreateLeg(1.0f, wheelAnchor);
 | 
			
		||||
 | 
			
		||||
        m_wheel->SetTransform(m_wheel->GetPosition(), -120.0f * b2_pi / 180.0f);
 | 
			
		||||
        CreateLeg(-1.0f, wheelAnchor);
 | 
			
		||||
        CreateLeg(1.0f, wheelAnchor);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Step(Settings* settings)
 | 
			
		||||
    {
 | 
			
		||||
        m_debugDraw.DrawString(5, m_textLine, "Keys: left = a, brake = s, right = d, toggle motor = m");
 | 
			
		||||
        m_textLine += 15;
 | 
			
		||||
 | 
			
		||||
        Test::Step(settings);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Keyboard(unsigned char key)
 | 
			
		||||
    {
 | 
			
		||||
        switch (key)
 | 
			
		||||
        {
 | 
			
		||||
        case 'a':
 | 
			
		||||
            m_motorJoint->SetMotorSpeed(-m_motorSpeed);
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case 's':
 | 
			
		||||
            m_motorJoint->SetMotorSpeed(0.0f);
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case 'd':
 | 
			
		||||
            m_motorJoint->SetMotorSpeed(m_motorSpeed);
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case 'm':
 | 
			
		||||
            m_motorJoint->EnableMotor(!m_motorJoint->IsMotorEnabled());
 | 
			
		||||
            break;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new TheoJansen;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    b2Vec2 m_offset;
 | 
			
		||||
    b2Body* m_chassis;
 | 
			
		||||
    b2Body* m_wheel;
 | 
			
		||||
    b2RevoluteJoint* m_motorJoint;
 | 
			
		||||
    bool m_motorOn;
 | 
			
		||||
    float32 m_motorSpeed;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif // THEO_JANSEN_H
 | 
			
		||||
 
 | 
			
		||||
@@ -1,156 +1,156 @@
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef TILES_H
 | 
			
		||||
#define TILES_H
 | 
			
		||||
 | 
			
		||||
/// This stress tests the dynamic tree broad-phase. This also shows that tile
 | 
			
		||||
/// based collision is _not_ smooth due to Box2D not knowing about adjacency.
 | 
			
		||||
class Tiles : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
    enum
 | 
			
		||||
    {
 | 
			
		||||
        e_count = 20
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    Tiles()
 | 
			
		||||
    {
 | 
			
		||||
        m_fixtureCount = 0;
 | 
			
		||||
        b2Timer timer;
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            float32 a = 0.5f;
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.position.y = -a;
 | 
			
		||||
            b2Body* ground = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
#if 1
 | 
			
		||||
            int32 N = 200;
 | 
			
		||||
            int32 M = 10;
 | 
			
		||||
            b2Vec2 position;
 | 
			
		||||
            position.y = 0.0f;
 | 
			
		||||
            for (int32 j = 0; j < M; ++j)
 | 
			
		||||
            {
 | 
			
		||||
                position.x = -N * a;
 | 
			
		||||
                for (int32 i = 0; i < N; ++i)
 | 
			
		||||
                {
 | 
			
		||||
                    b2PolygonShape shape;
 | 
			
		||||
                    shape.SetAsBox(a, a, position, 0.0f);
 | 
			
		||||
                    ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
                    ++m_fixtureCount;
 | 
			
		||||
                    position.x += 2.0f * a;
 | 
			
		||||
                }
 | 
			
		||||
                position.y -= 2.0f * a;
 | 
			
		||||
            }
 | 
			
		||||
#else
 | 
			
		||||
            int32 N = 200;
 | 
			
		||||
            int32 M = 10;
 | 
			
		||||
            b2Vec2 position;
 | 
			
		||||
            position.x = -N * a;
 | 
			
		||||
            for (int32 i = 0; i < N; ++i)
 | 
			
		||||
            {
 | 
			
		||||
                position.y = 0.0f;
 | 
			
		||||
                for (int32 j = 0; j < M; ++j)
 | 
			
		||||
                {
 | 
			
		||||
                    b2PolygonShape shape;
 | 
			
		||||
                    shape.SetAsBox(a, a, position, 0.0f);
 | 
			
		||||
                    ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
                    position.y -= 2.0f * a;
 | 
			
		||||
                }
 | 
			
		||||
                position.x += 2.0f * a;
 | 
			
		||||
            }
 | 
			
		||||
#endif
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            float32 a = 0.5f;
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(a, a);
 | 
			
		||||
 | 
			
		||||
            b2Vec2 x(-7.0f, 0.75f);
 | 
			
		||||
            b2Vec2 y;
 | 
			
		||||
            b2Vec2 deltaX(0.5625f, 1.25f);
 | 
			
		||||
            b2Vec2 deltaY(1.125f, 0.0f);
 | 
			
		||||
 | 
			
		||||
            for (int32 i = 0; i < e_count; ++i)
 | 
			
		||||
            {
 | 
			
		||||
                y = x;
 | 
			
		||||
 | 
			
		||||
                for (int32 j = i; j < e_count; ++j)
 | 
			
		||||
                {
 | 
			
		||||
                    b2BodyDef bd;
 | 
			
		||||
                    bd.type = b2_dynamicBody;
 | 
			
		||||
                    bd.position = y;
 | 
			
		||||
 | 
			
		||||
                    //if (i == 0 && j == 0)
 | 
			
		||||
                    //{
 | 
			
		||||
                    //  bd.allowSleep = false;
 | 
			
		||||
                    //}
 | 
			
		||||
                    //else
 | 
			
		||||
                    //{
 | 
			
		||||
                    //  bd.allowSleep = true;
 | 
			
		||||
                    //}
 | 
			
		||||
 | 
			
		||||
                    b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
                    body->CreateFixture(&shape, 5.0f);
 | 
			
		||||
                    ++m_fixtureCount;
 | 
			
		||||
                    y += deltaY;
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                x += deltaX;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        m_createTime = timer.GetMilliseconds();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Step(Settings* settings)
 | 
			
		||||
    {
 | 
			
		||||
        const b2ContactManager& cm = m_world->GetContactManager();
 | 
			
		||||
        int32 height = cm.m_broadPhase.GetTreeHeight();
 | 
			
		||||
        int32 leafCount = cm.m_broadPhase.GetProxyCount();
 | 
			
		||||
        int32 minimumNodeCount = 2 * leafCount - 1;
 | 
			
		||||
        float32 minimumHeight = ceilf(logf(float32(minimumNodeCount)) / logf(2.0f));
 | 
			
		||||
        m_debugDraw.DrawString(5, m_textLine, "dynamic tree height = %d, min = %d", height, int32(minimumHeight));
 | 
			
		||||
        m_textLine += 15;
 | 
			
		||||
 | 
			
		||||
        Test::Step(settings);
 | 
			
		||||
 | 
			
		||||
        m_debugDraw.DrawString(5, m_textLine, "create time = %6.2f ms, fixture count = %d",
 | 
			
		||||
            m_createTime, m_fixtureCount);
 | 
			
		||||
        m_textLine += 15;
 | 
			
		||||
 | 
			
		||||
        //b2DynamicTree* tree = &m_world->m_contactManager.m_broadPhase.m_tree;
 | 
			
		||||
 | 
			
		||||
        //if (m_stepCount == 400)
 | 
			
		||||
        //{
 | 
			
		||||
        //  tree->RebuildBottomUp();
 | 
			
		||||
        //}
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new Tiles;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    int32 m_fixtureCount;
 | 
			
		||||
    float32 m_createTime;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef TILES_H
 | 
			
		||||
#define TILES_H
 | 
			
		||||
 | 
			
		||||
/// This stress tests the dynamic tree broad-phase. This also shows that tile
 | 
			
		||||
/// based collision is _not_ smooth due to Box2D not knowing about adjacency.
 | 
			
		||||
class Tiles : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
    enum
 | 
			
		||||
    {
 | 
			
		||||
        e_count = 20
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    Tiles()
 | 
			
		||||
    {
 | 
			
		||||
        m_fixtureCount = 0;
 | 
			
		||||
        b2Timer timer;
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            float32 a = 0.5f;
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.position.y = -a;
 | 
			
		||||
            b2Body* ground = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
#if 1
 | 
			
		||||
            int32 N = 200;
 | 
			
		||||
            int32 M = 10;
 | 
			
		||||
            b2Vec2 position;
 | 
			
		||||
            position.y = 0.0f;
 | 
			
		||||
            for (int32 j = 0; j < M; ++j)
 | 
			
		||||
            {
 | 
			
		||||
                position.x = -N * a;
 | 
			
		||||
                for (int32 i = 0; i < N; ++i)
 | 
			
		||||
                {
 | 
			
		||||
                    b2PolygonShape shape;
 | 
			
		||||
                    shape.SetAsBox(a, a, position, 0.0f);
 | 
			
		||||
                    ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
                    ++m_fixtureCount;
 | 
			
		||||
                    position.x += 2.0f * a;
 | 
			
		||||
                }
 | 
			
		||||
                position.y -= 2.0f * a;
 | 
			
		||||
            }
 | 
			
		||||
#else
 | 
			
		||||
            int32 N = 200;
 | 
			
		||||
            int32 M = 10;
 | 
			
		||||
            b2Vec2 position;
 | 
			
		||||
            position.x = -N * a;
 | 
			
		||||
            for (int32 i = 0; i < N; ++i)
 | 
			
		||||
            {
 | 
			
		||||
                position.y = 0.0f;
 | 
			
		||||
                for (int32 j = 0; j < M; ++j)
 | 
			
		||||
                {
 | 
			
		||||
                    b2PolygonShape shape;
 | 
			
		||||
                    shape.SetAsBox(a, a, position, 0.0f);
 | 
			
		||||
                    ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
                    position.y -= 2.0f * a;
 | 
			
		||||
                }
 | 
			
		||||
                position.x += 2.0f * a;
 | 
			
		||||
            }
 | 
			
		||||
#endif
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            float32 a = 0.5f;
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(a, a);
 | 
			
		||||
 | 
			
		||||
            b2Vec2 x(-7.0f, 0.75f);
 | 
			
		||||
            b2Vec2 y;
 | 
			
		||||
            b2Vec2 deltaX(0.5625f, 1.25f);
 | 
			
		||||
            b2Vec2 deltaY(1.125f, 0.0f);
 | 
			
		||||
 | 
			
		||||
            for (int32 i = 0; i < e_count; ++i)
 | 
			
		||||
            {
 | 
			
		||||
                y = x;
 | 
			
		||||
 | 
			
		||||
                for (int32 j = i; j < e_count; ++j)
 | 
			
		||||
                {
 | 
			
		||||
                    b2BodyDef bd;
 | 
			
		||||
                    bd.type = b2_dynamicBody;
 | 
			
		||||
                    bd.position = y;
 | 
			
		||||
 | 
			
		||||
                    //if (i == 0 && j == 0)
 | 
			
		||||
                    //{
 | 
			
		||||
                    //  bd.allowSleep = false;
 | 
			
		||||
                    //}
 | 
			
		||||
                    //else
 | 
			
		||||
                    //{
 | 
			
		||||
                    //  bd.allowSleep = true;
 | 
			
		||||
                    //}
 | 
			
		||||
 | 
			
		||||
                    b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
                    body->CreateFixture(&shape, 5.0f);
 | 
			
		||||
                    ++m_fixtureCount;
 | 
			
		||||
                    y += deltaY;
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                x += deltaX;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        m_createTime = timer.GetMilliseconds();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Step(Settings* settings)
 | 
			
		||||
    {
 | 
			
		||||
        const b2ContactManager& cm = m_world->GetContactManager();
 | 
			
		||||
        int32 height = cm.m_broadPhase.GetTreeHeight();
 | 
			
		||||
        int32 leafCount = cm.m_broadPhase.GetProxyCount();
 | 
			
		||||
        int32 minimumNodeCount = 2 * leafCount - 1;
 | 
			
		||||
        float32 minimumHeight = ceilf(logf(float32(minimumNodeCount)) / logf(2.0f));
 | 
			
		||||
        m_debugDraw.DrawString(5, m_textLine, "dynamic tree height = %d, min = %d", height, int32(minimumHeight));
 | 
			
		||||
        m_textLine += 15;
 | 
			
		||||
 | 
			
		||||
        Test::Step(settings);
 | 
			
		||||
 | 
			
		||||
        m_debugDraw.DrawString(5, m_textLine, "create time = %6.2f ms, fixture count = %d",
 | 
			
		||||
            m_createTime, m_fixtureCount);
 | 
			
		||||
        m_textLine += 15;
 | 
			
		||||
 | 
			
		||||
        //b2DynamicTree* tree = &m_world->m_contactManager.m_broadPhase.m_tree;
 | 
			
		||||
 | 
			
		||||
        //if (m_stepCount == 400)
 | 
			
		||||
        //{
 | 
			
		||||
        //  tree->RebuildBottomUp();
 | 
			
		||||
        //}
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new Tiles;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    int32 m_fixtureCount;
 | 
			
		||||
    float32 m_createTime;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -1,131 +1,131 @@
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef TIME_OF_IMPACT_H
 | 
			
		||||
#define TIME_OF_IMPACT_H
 | 
			
		||||
 | 
			
		||||
class TimeOfImpact : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
    TimeOfImpact()
 | 
			
		||||
    {
 | 
			
		||||
        m_shapeA.SetAsBox(25.0f, 5.0f);
 | 
			
		||||
        m_shapeB.SetAsBox(2.5f, 2.5f);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new TimeOfImpact;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Step(Settings* settings)
 | 
			
		||||
    {
 | 
			
		||||
        Test::Step(settings);
 | 
			
		||||
 | 
			
		||||
        b2Sweep sweepA;
 | 
			
		||||
        sweepA.c0.Set(24.0f, -60.0f);
 | 
			
		||||
        sweepA.a0 = 2.95f;
 | 
			
		||||
        sweepA.c = sweepA.c0;
 | 
			
		||||
        sweepA.a = sweepA.a0;
 | 
			
		||||
        sweepA.localCenter.SetZero();
 | 
			
		||||
 | 
			
		||||
        b2Sweep sweepB;
 | 
			
		||||
        sweepB.c0.Set(53.474274f, -50.252514f);
 | 
			
		||||
        sweepB.a0 = 513.36676f; // - 162.0f * b2_pi;
 | 
			
		||||
        sweepB.c.Set(54.595478f, -51.083473f);
 | 
			
		||||
        sweepB.a = 513.62781f; //  - 162.0f * b2_pi;
 | 
			
		||||
        sweepB.localCenter.SetZero();
 | 
			
		||||
 | 
			
		||||
        //sweepB.a0 -= 300.0f * b2_pi;
 | 
			
		||||
        //sweepB.a -= 300.0f * b2_pi;
 | 
			
		||||
 | 
			
		||||
        b2TOIInput input;
 | 
			
		||||
        input.proxyA.Set(&m_shapeA, 0);
 | 
			
		||||
        input.proxyB.Set(&m_shapeB, 0);
 | 
			
		||||
        input.sweepA = sweepA;
 | 
			
		||||
        input.sweepB = sweepB;
 | 
			
		||||
        input.tMax = 1.0f;
 | 
			
		||||
 | 
			
		||||
        b2TOIOutput output;
 | 
			
		||||
 | 
			
		||||
        b2TimeOfImpact(&output, &input);
 | 
			
		||||
 | 
			
		||||
        m_debugDraw.DrawString(5, m_textLine, "toi = %g", output.t);
 | 
			
		||||
        m_textLine += 15;
 | 
			
		||||
 | 
			
		||||
        extern int32 b2_toiMaxIters, b2_toiMaxRootIters;
 | 
			
		||||
        m_debugDraw.DrawString(5, m_textLine, "max toi iters = %d, max root iters = %d", b2_toiMaxIters, b2_toiMaxRootIters);
 | 
			
		||||
        m_textLine += 15;
 | 
			
		||||
 | 
			
		||||
        b2Vec2 vertices[b2_maxPolygonVertices];
 | 
			
		||||
 | 
			
		||||
        b2Transform transformA;
 | 
			
		||||
        sweepA.GetTransform(&transformA, 0.0f);
 | 
			
		||||
        for (int32 i = 0; i < m_shapeA.m_vertexCount; ++i)
 | 
			
		||||
        {
 | 
			
		||||
            vertices[i] = b2Mul(transformA, m_shapeA.m_vertices[i]);
 | 
			
		||||
        }
 | 
			
		||||
        m_debugDraw.DrawPolygon(vertices, m_shapeA.m_vertexCount, b2Color(0.9f, 0.9f, 0.9f));
 | 
			
		||||
 | 
			
		||||
        b2Transform transformB;
 | 
			
		||||
        sweepB.GetTransform(&transformB, 0.0f);
 | 
			
		||||
 | 
			
		||||
        b2Vec2 localPoint(2.0f, -0.1f);
 | 
			
		||||
        b2Vec2 rB = b2Mul(transformB, localPoint) - sweepB.c0;
 | 
			
		||||
        float32 wB = sweepB.a - sweepB.a0;
 | 
			
		||||
        b2Vec2 vB = sweepB.c - sweepB.c0;
 | 
			
		||||
        b2Vec2 v = vB + b2Cross(wB, rB);
 | 
			
		||||
 | 
			
		||||
        for (int32 i = 0; i < m_shapeB.m_vertexCount; ++i)
 | 
			
		||||
        {
 | 
			
		||||
            vertices[i] = b2Mul(transformB, m_shapeB.m_vertices[i]);
 | 
			
		||||
        }
 | 
			
		||||
        m_debugDraw.DrawPolygon(vertices, m_shapeB.m_vertexCount, b2Color(0.5f, 0.9f, 0.5f));
 | 
			
		||||
 | 
			
		||||
        sweepB.GetTransform(&transformB, output.t);
 | 
			
		||||
        for (int32 i = 0; i < m_shapeB.m_vertexCount; ++i)
 | 
			
		||||
        {
 | 
			
		||||
            vertices[i] = b2Mul(transformB, m_shapeB.m_vertices[i]);
 | 
			
		||||
        }
 | 
			
		||||
        m_debugDraw.DrawPolygon(vertices, m_shapeB.m_vertexCount, b2Color(0.5f, 0.7f, 0.9f));
 | 
			
		||||
 | 
			
		||||
        sweepB.GetTransform(&transformB, 1.0f);
 | 
			
		||||
        for (int32 i = 0; i < m_shapeB.m_vertexCount; ++i)
 | 
			
		||||
        {
 | 
			
		||||
            vertices[i] = b2Mul(transformB, m_shapeB.m_vertices[i]);
 | 
			
		||||
        }
 | 
			
		||||
        m_debugDraw.DrawPolygon(vertices, m_shapeB.m_vertexCount, b2Color(0.9f, 0.5f, 0.5f));
 | 
			
		||||
 | 
			
		||||
#if 0
 | 
			
		||||
        for (float32 t = 0.0f; t < 1.0f; t += 0.1f)
 | 
			
		||||
        {
 | 
			
		||||
            sweepB.GetTransform(&transformB, t);
 | 
			
		||||
            for (int32 i = 0; i < m_shapeB.m_vertexCount; ++i)
 | 
			
		||||
            {
 | 
			
		||||
                vertices[i] = b2Mul(transformB, m_shapeB.m_vertices[i]);
 | 
			
		||||
            }
 | 
			
		||||
            m_debugDraw.DrawPolygon(vertices, m_shapeB.m_vertexCount, b2Color(0.9f, 0.5f, 0.5f));
 | 
			
		||||
        }
 | 
			
		||||
#endif
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    b2PolygonShape m_shapeA;
 | 
			
		||||
    b2PolygonShape m_shapeB;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef TIME_OF_IMPACT_H
 | 
			
		||||
#define TIME_OF_IMPACT_H
 | 
			
		||||
 | 
			
		||||
class TimeOfImpact : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
    TimeOfImpact()
 | 
			
		||||
    {
 | 
			
		||||
        m_shapeA.SetAsBox(25.0f, 5.0f);
 | 
			
		||||
        m_shapeB.SetAsBox(2.5f, 2.5f);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new TimeOfImpact;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Step(Settings* settings)
 | 
			
		||||
    {
 | 
			
		||||
        Test::Step(settings);
 | 
			
		||||
 | 
			
		||||
        b2Sweep sweepA;
 | 
			
		||||
        sweepA.c0.Set(24.0f, -60.0f);
 | 
			
		||||
        sweepA.a0 = 2.95f;
 | 
			
		||||
        sweepA.c = sweepA.c0;
 | 
			
		||||
        sweepA.a = sweepA.a0;
 | 
			
		||||
        sweepA.localCenter.SetZero();
 | 
			
		||||
 | 
			
		||||
        b2Sweep sweepB;
 | 
			
		||||
        sweepB.c0.Set(53.474274f, -50.252514f);
 | 
			
		||||
        sweepB.a0 = 513.36676f; // - 162.0f * b2_pi;
 | 
			
		||||
        sweepB.c.Set(54.595478f, -51.083473f);
 | 
			
		||||
        sweepB.a = 513.62781f; //  - 162.0f * b2_pi;
 | 
			
		||||
        sweepB.localCenter.SetZero();
 | 
			
		||||
 | 
			
		||||
        //sweepB.a0 -= 300.0f * b2_pi;
 | 
			
		||||
        //sweepB.a -= 300.0f * b2_pi;
 | 
			
		||||
 | 
			
		||||
        b2TOIInput input;
 | 
			
		||||
        input.proxyA.Set(&m_shapeA, 0);
 | 
			
		||||
        input.proxyB.Set(&m_shapeB, 0);
 | 
			
		||||
        input.sweepA = sweepA;
 | 
			
		||||
        input.sweepB = sweepB;
 | 
			
		||||
        input.tMax = 1.0f;
 | 
			
		||||
 | 
			
		||||
        b2TOIOutput output;
 | 
			
		||||
 | 
			
		||||
        b2TimeOfImpact(&output, &input);
 | 
			
		||||
 | 
			
		||||
        m_debugDraw.DrawString(5, m_textLine, "toi = %g", output.t);
 | 
			
		||||
        m_textLine += 15;
 | 
			
		||||
 | 
			
		||||
        extern int32 b2_toiMaxIters, b2_toiMaxRootIters;
 | 
			
		||||
        m_debugDraw.DrawString(5, m_textLine, "max toi iters = %d, max root iters = %d", b2_toiMaxIters, b2_toiMaxRootIters);
 | 
			
		||||
        m_textLine += 15;
 | 
			
		||||
 | 
			
		||||
        b2Vec2 vertices[b2_maxPolygonVertices];
 | 
			
		||||
 | 
			
		||||
        b2Transform transformA;
 | 
			
		||||
        sweepA.GetTransform(&transformA, 0.0f);
 | 
			
		||||
        for (int32 i = 0; i < m_shapeA.m_vertexCount; ++i)
 | 
			
		||||
        {
 | 
			
		||||
            vertices[i] = b2Mul(transformA, m_shapeA.m_vertices[i]);
 | 
			
		||||
        }
 | 
			
		||||
        m_debugDraw.DrawPolygon(vertices, m_shapeA.m_vertexCount, b2Color(0.9f, 0.9f, 0.9f));
 | 
			
		||||
 | 
			
		||||
        b2Transform transformB;
 | 
			
		||||
        sweepB.GetTransform(&transformB, 0.0f);
 | 
			
		||||
 | 
			
		||||
        b2Vec2 localPoint(2.0f, -0.1f);
 | 
			
		||||
        b2Vec2 rB = b2Mul(transformB, localPoint) - sweepB.c0;
 | 
			
		||||
        float32 wB = sweepB.a - sweepB.a0;
 | 
			
		||||
        b2Vec2 vB = sweepB.c - sweepB.c0;
 | 
			
		||||
        b2Vec2 v = vB + b2Cross(wB, rB);
 | 
			
		||||
 | 
			
		||||
        for (int32 i = 0; i < m_shapeB.m_vertexCount; ++i)
 | 
			
		||||
        {
 | 
			
		||||
            vertices[i] = b2Mul(transformB, m_shapeB.m_vertices[i]);
 | 
			
		||||
        }
 | 
			
		||||
        m_debugDraw.DrawPolygon(vertices, m_shapeB.m_vertexCount, b2Color(0.5f, 0.9f, 0.5f));
 | 
			
		||||
 | 
			
		||||
        sweepB.GetTransform(&transformB, output.t);
 | 
			
		||||
        for (int32 i = 0; i < m_shapeB.m_vertexCount; ++i)
 | 
			
		||||
        {
 | 
			
		||||
            vertices[i] = b2Mul(transformB, m_shapeB.m_vertices[i]);
 | 
			
		||||
        }
 | 
			
		||||
        m_debugDraw.DrawPolygon(vertices, m_shapeB.m_vertexCount, b2Color(0.5f, 0.7f, 0.9f));
 | 
			
		||||
 | 
			
		||||
        sweepB.GetTransform(&transformB, 1.0f);
 | 
			
		||||
        for (int32 i = 0; i < m_shapeB.m_vertexCount; ++i)
 | 
			
		||||
        {
 | 
			
		||||
            vertices[i] = b2Mul(transformB, m_shapeB.m_vertices[i]);
 | 
			
		||||
        }
 | 
			
		||||
        m_debugDraw.DrawPolygon(vertices, m_shapeB.m_vertexCount, b2Color(0.9f, 0.5f, 0.5f));
 | 
			
		||||
 | 
			
		||||
#if 0
 | 
			
		||||
        for (float32 t = 0.0f; t < 1.0f; t += 0.1f)
 | 
			
		||||
        {
 | 
			
		||||
            sweepB.GetTransform(&transformB, t);
 | 
			
		||||
            for (int32 i = 0; i < m_shapeB.m_vertexCount; ++i)
 | 
			
		||||
            {
 | 
			
		||||
                vertices[i] = b2Mul(transformB, m_shapeB.m_vertices[i]);
 | 
			
		||||
            }
 | 
			
		||||
            m_debugDraw.DrawPolygon(vertices, m_shapeB.m_vertexCount, b2Color(0.9f, 0.5f, 0.5f));
 | 
			
		||||
        }
 | 
			
		||||
#endif
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    b2PolygonShape m_shapeA;
 | 
			
		||||
    b2PolygonShape m_shapeB;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -1,99 +1,99 @@
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2011 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef TUMBLER_H
 | 
			
		||||
#define TUMBLER_H
 | 
			
		||||
 | 
			
		||||
class Tumbler : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
 | 
			
		||||
    enum
 | 
			
		||||
    {
 | 
			
		||||
        e_count = 800
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    Tumbler()
 | 
			
		||||
    {
 | 
			
		||||
        b2Body* ground = NULL;
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            ground = m_world->CreateBody(&bd);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
            bd.allowSleep = false;
 | 
			
		||||
            bd.position.Set(0.0f, 10.0f);
 | 
			
		||||
            b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(0.5f, 10.0f, b2Vec2( 10.0f, 0.0f), 0.0);
 | 
			
		||||
            body->CreateFixture(&shape, 5.0f);
 | 
			
		||||
            shape.SetAsBox(0.5f, 10.0f, b2Vec2(-10.0f, 0.0f), 0.0);
 | 
			
		||||
            body->CreateFixture(&shape, 5.0f);
 | 
			
		||||
            shape.SetAsBox(10.0f, 0.5f, b2Vec2(0.0f, 10.0f), 0.0);
 | 
			
		||||
            body->CreateFixture(&shape, 5.0f);
 | 
			
		||||
            shape.SetAsBox(10.0f, 0.5f, b2Vec2(0.0f, -10.0f), 0.0);
 | 
			
		||||
            body->CreateFixture(&shape, 5.0f);
 | 
			
		||||
 | 
			
		||||
            b2RevoluteJointDef jd;
 | 
			
		||||
            jd.bodyA = ground;
 | 
			
		||||
            jd.bodyB = body;
 | 
			
		||||
            jd.localAnchorA.Set(0.0f, 10.0f);
 | 
			
		||||
            jd.localAnchorB.Set(0.0f, 0.0f);
 | 
			
		||||
            jd.referenceAngle = 0.0f;
 | 
			
		||||
            jd.motorSpeed = 0.05f * b2_pi;
 | 
			
		||||
            jd.maxMotorTorque = 1e8f;
 | 
			
		||||
            jd.enableMotor = true;
 | 
			
		||||
            m_joint = (b2RevoluteJoint*)m_world->CreateJoint(&jd);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        m_count = 0;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Step(Settings* settings)
 | 
			
		||||
    {
 | 
			
		||||
        Test::Step(settings);
 | 
			
		||||
 | 
			
		||||
        if (m_count < e_count)
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
            bd.position.Set(0.0f, 10.0f);
 | 
			
		||||
            b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(0.125f, 0.125f);
 | 
			
		||||
            body->CreateFixture(&shape, 1.0f);
 | 
			
		||||
 | 
			
		||||
            ++m_count;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new Tumbler;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    b2RevoluteJoint* m_joint;
 | 
			
		||||
    int32 m_count;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2011 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef TUMBLER_H
 | 
			
		||||
#define TUMBLER_H
 | 
			
		||||
 | 
			
		||||
class Tumbler : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
 | 
			
		||||
    enum
 | 
			
		||||
    {
 | 
			
		||||
        e_count = 800
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    Tumbler()
 | 
			
		||||
    {
 | 
			
		||||
        b2Body* ground = NULL;
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            ground = m_world->CreateBody(&bd);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
            bd.allowSleep = false;
 | 
			
		||||
            bd.position.Set(0.0f, 10.0f);
 | 
			
		||||
            b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(0.5f, 10.0f, b2Vec2( 10.0f, 0.0f), 0.0);
 | 
			
		||||
            body->CreateFixture(&shape, 5.0f);
 | 
			
		||||
            shape.SetAsBox(0.5f, 10.0f, b2Vec2(-10.0f, 0.0f), 0.0);
 | 
			
		||||
            body->CreateFixture(&shape, 5.0f);
 | 
			
		||||
            shape.SetAsBox(10.0f, 0.5f, b2Vec2(0.0f, 10.0f), 0.0);
 | 
			
		||||
            body->CreateFixture(&shape, 5.0f);
 | 
			
		||||
            shape.SetAsBox(10.0f, 0.5f, b2Vec2(0.0f, -10.0f), 0.0);
 | 
			
		||||
            body->CreateFixture(&shape, 5.0f);
 | 
			
		||||
 | 
			
		||||
            b2RevoluteJointDef jd;
 | 
			
		||||
            jd.bodyA = ground;
 | 
			
		||||
            jd.bodyB = body;
 | 
			
		||||
            jd.localAnchorA.Set(0.0f, 10.0f);
 | 
			
		||||
            jd.localAnchorB.Set(0.0f, 0.0f);
 | 
			
		||||
            jd.referenceAngle = 0.0f;
 | 
			
		||||
            jd.motorSpeed = 0.05f * b2_pi;
 | 
			
		||||
            jd.maxMotorTorque = 1e8f;
 | 
			
		||||
            jd.enableMotor = true;
 | 
			
		||||
            m_joint = (b2RevoluteJoint*)m_world->CreateJoint(&jd);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        m_count = 0;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Step(Settings* settings)
 | 
			
		||||
    {
 | 
			
		||||
        Test::Step(settings);
 | 
			
		||||
 | 
			
		||||
        if (m_count < e_count)
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
            bd.position.Set(0.0f, 10.0f);
 | 
			
		||||
            b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(0.125f, 0.125f);
 | 
			
		||||
            body->CreateFixture(&shape, 1.0f);
 | 
			
		||||
 | 
			
		||||
            ++m_count;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new Tumbler;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    b2RevoluteJoint* m_joint;
 | 
			
		||||
    int32 m_count;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -1,124 +1,124 @@
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef VARYING_FRICTION_H
 | 
			
		||||
#define VARYING_FRICTION_H
 | 
			
		||||
 | 
			
		||||
class VaryingFriction : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
 | 
			
		||||
    VaryingFriction()
 | 
			
		||||
    {
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            b2Body* ground = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2EdgeShape shape;
 | 
			
		||||
            shape.Set(b2Vec2(-40.0f, 0.0f), b2Vec2(40.0f, 0.0f));
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(13.0f, 0.25f);
 | 
			
		||||
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.position.Set(-4.0f, 22.0f);
 | 
			
		||||
            bd.angle = -0.25f;
 | 
			
		||||
 | 
			
		||||
            b2Body* ground = m_world->CreateBody(&bd);
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(0.25f, 1.0f);
 | 
			
		||||
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.position.Set(10.5f, 19.0f);
 | 
			
		||||
 | 
			
		||||
            b2Body* ground = m_world->CreateBody(&bd);
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(13.0f, 0.25f);
 | 
			
		||||
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.position.Set(4.0f, 14.0f);
 | 
			
		||||
            bd.angle = 0.25f;
 | 
			
		||||
 | 
			
		||||
            b2Body* ground = m_world->CreateBody(&bd);
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(0.25f, 1.0f);
 | 
			
		||||
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.position.Set(-10.5f, 11.0f);
 | 
			
		||||
 | 
			
		||||
            b2Body* ground = m_world->CreateBody(&bd);
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(13.0f, 0.25f);
 | 
			
		||||
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.position.Set(-4.0f, 6.0f);
 | 
			
		||||
            bd.angle = -0.25f;
 | 
			
		||||
 | 
			
		||||
            b2Body* ground = m_world->CreateBody(&bd);
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(0.5f, 0.5f);
 | 
			
		||||
 | 
			
		||||
            b2FixtureDef fd;
 | 
			
		||||
            fd.shape = &shape;
 | 
			
		||||
            fd.density = 25.0f;
 | 
			
		||||
 | 
			
		||||
            float friction[5] = {0.75f, 0.5f, 0.35f, 0.1f, 0.0f};
 | 
			
		||||
 | 
			
		||||
            for (int i = 0; i < 5; ++i)
 | 
			
		||||
            {
 | 
			
		||||
                b2BodyDef bd;
 | 
			
		||||
                bd.type = b2_dynamicBody;
 | 
			
		||||
                bd.position.Set(-15.0f + 4.0f * i, 28.0f);
 | 
			
		||||
                b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
                fd.friction = friction[i];
 | 
			
		||||
                body->CreateFixture(&fd);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new VaryingFriction;
 | 
			
		||||
    }
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef VARYING_FRICTION_H
 | 
			
		||||
#define VARYING_FRICTION_H
 | 
			
		||||
 | 
			
		||||
class VaryingFriction : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
 | 
			
		||||
    VaryingFriction()
 | 
			
		||||
    {
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            b2Body* ground = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2EdgeShape shape;
 | 
			
		||||
            shape.Set(b2Vec2(-40.0f, 0.0f), b2Vec2(40.0f, 0.0f));
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(13.0f, 0.25f);
 | 
			
		||||
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.position.Set(-4.0f, 22.0f);
 | 
			
		||||
            bd.angle = -0.25f;
 | 
			
		||||
 | 
			
		||||
            b2Body* ground = m_world->CreateBody(&bd);
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(0.25f, 1.0f);
 | 
			
		||||
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.position.Set(10.5f, 19.0f);
 | 
			
		||||
 | 
			
		||||
            b2Body* ground = m_world->CreateBody(&bd);
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(13.0f, 0.25f);
 | 
			
		||||
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.position.Set(4.0f, 14.0f);
 | 
			
		||||
            bd.angle = 0.25f;
 | 
			
		||||
 | 
			
		||||
            b2Body* ground = m_world->CreateBody(&bd);
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(0.25f, 1.0f);
 | 
			
		||||
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.position.Set(-10.5f, 11.0f);
 | 
			
		||||
 | 
			
		||||
            b2Body* ground = m_world->CreateBody(&bd);
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(13.0f, 0.25f);
 | 
			
		||||
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.position.Set(-4.0f, 6.0f);
 | 
			
		||||
            bd.angle = -0.25f;
 | 
			
		||||
 | 
			
		||||
            b2Body* ground = m_world->CreateBody(&bd);
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(0.5f, 0.5f);
 | 
			
		||||
 | 
			
		||||
            b2FixtureDef fd;
 | 
			
		||||
            fd.shape = &shape;
 | 
			
		||||
            fd.density = 25.0f;
 | 
			
		||||
 | 
			
		||||
            float friction[5] = {0.75f, 0.5f, 0.35f, 0.1f, 0.0f};
 | 
			
		||||
 | 
			
		||||
            for (int i = 0; i < 5; ++i)
 | 
			
		||||
            {
 | 
			
		||||
                b2BodyDef bd;
 | 
			
		||||
                bd.type = b2_dynamicBody;
 | 
			
		||||
                bd.position.Set(-15.0f + 4.0f * i, 28.0f);
 | 
			
		||||
                b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
                fd.friction = friction[i];
 | 
			
		||||
                body->CreateFixture(&fd);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new VaryingFriction;
 | 
			
		||||
    }
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -1,69 +1,69 @@
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef VARYING_RESTITUTION_H
 | 
			
		||||
#define VARYING_RESTITUTION_H
 | 
			
		||||
 | 
			
		||||
// Note: even with a restitution of 1.0, there is some energy change
 | 
			
		||||
// due to position correction.
 | 
			
		||||
class VaryingRestitution : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
 | 
			
		||||
    VaryingRestitution()
 | 
			
		||||
    {
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            b2Body* ground = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2EdgeShape shape;
 | 
			
		||||
            shape.Set(b2Vec2(-40.0f, 0.0f), b2Vec2(40.0f, 0.0f));
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2CircleShape shape;
 | 
			
		||||
            shape.m_radius = 1.0f;
 | 
			
		||||
 | 
			
		||||
            b2FixtureDef fd;
 | 
			
		||||
            fd.shape = &shape;
 | 
			
		||||
            fd.density = 1.0f;
 | 
			
		||||
 | 
			
		||||
            float32 restitution[7] = {0.0f, 0.1f, 0.3f, 0.5f, 0.75f, 0.9f, 1.0f};
 | 
			
		||||
 | 
			
		||||
            for (int32 i = 0; i < 7; ++i)
 | 
			
		||||
            {
 | 
			
		||||
                b2BodyDef bd;
 | 
			
		||||
                bd.type = b2_dynamicBody;
 | 
			
		||||
                bd.position.Set(-10.0f + 3.0f * i, 20.0f);
 | 
			
		||||
 | 
			
		||||
                b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
                fd.restitution = restitution[i];
 | 
			
		||||
                body->CreateFixture(&fd);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new VaryingRestitution;
 | 
			
		||||
    }
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef VARYING_RESTITUTION_H
 | 
			
		||||
#define VARYING_RESTITUTION_H
 | 
			
		||||
 | 
			
		||||
// Note: even with a restitution of 1.0, there is some energy change
 | 
			
		||||
// due to position correction.
 | 
			
		||||
class VaryingRestitution : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
 | 
			
		||||
    VaryingRestitution()
 | 
			
		||||
    {
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            b2Body* ground = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2EdgeShape shape;
 | 
			
		||||
            shape.Set(b2Vec2(-40.0f, 0.0f), b2Vec2(40.0f, 0.0f));
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2CircleShape shape;
 | 
			
		||||
            shape.m_radius = 1.0f;
 | 
			
		||||
 | 
			
		||||
            b2FixtureDef fd;
 | 
			
		||||
            fd.shape = &shape;
 | 
			
		||||
            fd.density = 1.0f;
 | 
			
		||||
 | 
			
		||||
            float32 restitution[7] = {0.0f, 0.1f, 0.3f, 0.5f, 0.75f, 0.9f, 1.0f};
 | 
			
		||||
 | 
			
		||||
            for (int32 i = 0; i < 7; ++i)
 | 
			
		||||
            {
 | 
			
		||||
                b2BodyDef bd;
 | 
			
		||||
                bd.type = b2_dynamicBody;
 | 
			
		||||
                bd.position.Set(-10.0f + 3.0f * i, 20.0f);
 | 
			
		||||
 | 
			
		||||
                b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
                fd.restitution = restitution[i];
 | 
			
		||||
                body->CreateFixture(&fd);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new VaryingRestitution;
 | 
			
		||||
    }
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -1,165 +1,165 @@
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef VERTICAL_STACK_H
 | 
			
		||||
#define VERTICAL_STACK_H
 | 
			
		||||
 | 
			
		||||
class VerticalStack : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
 | 
			
		||||
    enum
 | 
			
		||||
    {
 | 
			
		||||
        e_columnCount = 5,
 | 
			
		||||
        e_rowCount = 16
 | 
			
		||||
        //e_columnCount = 1,
 | 
			
		||||
        //e_rowCount = 1
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    VerticalStack()
 | 
			
		||||
    {
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            b2Body* ground = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2EdgeShape shape;
 | 
			
		||||
            shape.Set(b2Vec2(-40.0f, 0.0f), b2Vec2(40.0f, 0.0f));
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
 | 
			
		||||
            shape.Set(b2Vec2(20.0f, 0.0f), b2Vec2(20.0f, 20.0f));
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        float32 xs[5] = {0.0f, -10.0f, -5.0f, 5.0f, 10.0f};
 | 
			
		||||
 | 
			
		||||
        for (int32 j = 0; j < e_columnCount; ++j)
 | 
			
		||||
        {
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(0.5f, 0.5f);
 | 
			
		||||
 | 
			
		||||
            b2FixtureDef fd;
 | 
			
		||||
            fd.shape = &shape;
 | 
			
		||||
            fd.density = 1.0f;
 | 
			
		||||
            fd.friction = 0.3f;
 | 
			
		||||
 | 
			
		||||
            for (int i = 0; i < e_rowCount; ++i)
 | 
			
		||||
            {
 | 
			
		||||
                b2BodyDef bd;
 | 
			
		||||
                bd.type = b2_dynamicBody;
 | 
			
		||||
 | 
			
		||||
                int32 n = j * e_rowCount + i;
 | 
			
		||||
                b2Assert(n < e_rowCount * e_columnCount);
 | 
			
		||||
                m_indices[n] = n;
 | 
			
		||||
                bd.userData = m_indices + n;
 | 
			
		||||
 | 
			
		||||
                float32 x = 0.0f;
 | 
			
		||||
                //float32 x = RandomFloat(-0.02f, 0.02f);
 | 
			
		||||
                //float32 x = i % 2 == 0 ? -0.025f : 0.025f;
 | 
			
		||||
                bd.position.Set(xs[j] + x, 0.752f + 1.54f * i);
 | 
			
		||||
                b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
                m_bodies[n] = body;
 | 
			
		||||
 | 
			
		||||
                body->CreateFixture(&fd);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        m_bullet = NULL;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Keyboard(unsigned char key)
 | 
			
		||||
    {
 | 
			
		||||
        switch (key)
 | 
			
		||||
        {
 | 
			
		||||
        case ',':
 | 
			
		||||
            if (m_bullet != NULL)
 | 
			
		||||
            {
 | 
			
		||||
                m_world->DestroyBody(m_bullet);
 | 
			
		||||
                m_bullet = NULL;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            {
 | 
			
		||||
                b2CircleShape shape;
 | 
			
		||||
                shape.m_radius = 0.25f;
 | 
			
		||||
 | 
			
		||||
                b2FixtureDef fd;
 | 
			
		||||
                fd.shape = &shape;
 | 
			
		||||
                fd.density = 20.0f;
 | 
			
		||||
                fd.restitution = 0.05f;
 | 
			
		||||
 | 
			
		||||
                b2BodyDef bd;
 | 
			
		||||
                bd.type = b2_dynamicBody;
 | 
			
		||||
                bd.bullet = true;
 | 
			
		||||
                bd.position.Set(-31.0f, 5.0f);
 | 
			
		||||
 | 
			
		||||
                m_bullet = m_world->CreateBody(&bd);
 | 
			
		||||
                m_bullet->CreateFixture(&fd);
 | 
			
		||||
 | 
			
		||||
                m_bullet->SetLinearVelocity(b2Vec2(400.0f, 0.0f));
 | 
			
		||||
            }
 | 
			
		||||
            break;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Step(Settings* settings)
 | 
			
		||||
    {
 | 
			
		||||
        Test::Step(settings);
 | 
			
		||||
        m_debugDraw.DrawString(5, m_textLine, "Press: (,) to launch a bullet.");
 | 
			
		||||
        m_textLine += 15;
 | 
			
		||||
 | 
			
		||||
        //if (m_stepCount == 300)
 | 
			
		||||
        //{
 | 
			
		||||
        //  if (m_bullet != NULL)
 | 
			
		||||
        //  {
 | 
			
		||||
        //      m_world->DestroyBody(m_bullet);
 | 
			
		||||
        //      m_bullet = NULL;
 | 
			
		||||
        //  }
 | 
			
		||||
 | 
			
		||||
        //  {
 | 
			
		||||
        //      b2CircleShape shape;
 | 
			
		||||
        //      shape.m_radius = 0.25f;
 | 
			
		||||
 | 
			
		||||
        //      b2FixtureDef fd;
 | 
			
		||||
        //      fd.shape = &shape;
 | 
			
		||||
        //      fd.density = 20.0f;
 | 
			
		||||
        //      fd.restitution = 0.05f;
 | 
			
		||||
 | 
			
		||||
        //      b2BodyDef bd;
 | 
			
		||||
        //      bd.type = b2_dynamicBody;
 | 
			
		||||
        //      bd.bullet = true;
 | 
			
		||||
        //      bd.position.Set(-31.0f, 5.0f);
 | 
			
		||||
 | 
			
		||||
        //      m_bullet = m_world->CreateBody(&bd);
 | 
			
		||||
        //      m_bullet->CreateFixture(&fd);
 | 
			
		||||
 | 
			
		||||
        //      m_bullet->SetLinearVelocity(b2Vec2(400.0f, 0.0f));
 | 
			
		||||
        //  }
 | 
			
		||||
        //}
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new VerticalStack;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    b2Body* m_bullet;
 | 
			
		||||
    b2Body* m_bodies[e_rowCount * e_columnCount];
 | 
			
		||||
    int32 m_indices[e_rowCount * e_columnCount];
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef VERTICAL_STACK_H
 | 
			
		||||
#define VERTICAL_STACK_H
 | 
			
		||||
 | 
			
		||||
class VerticalStack : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
 | 
			
		||||
    enum
 | 
			
		||||
    {
 | 
			
		||||
        e_columnCount = 5,
 | 
			
		||||
        e_rowCount = 16
 | 
			
		||||
        //e_columnCount = 1,
 | 
			
		||||
        //e_rowCount = 1
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    VerticalStack()
 | 
			
		||||
    {
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            b2Body* ground = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2EdgeShape shape;
 | 
			
		||||
            shape.Set(b2Vec2(-40.0f, 0.0f), b2Vec2(40.0f, 0.0f));
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
 | 
			
		||||
            shape.Set(b2Vec2(20.0f, 0.0f), b2Vec2(20.0f, 20.0f));
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        float32 xs[5] = {0.0f, -10.0f, -5.0f, 5.0f, 10.0f};
 | 
			
		||||
 | 
			
		||||
        for (int32 j = 0; j < e_columnCount; ++j)
 | 
			
		||||
        {
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(0.5f, 0.5f);
 | 
			
		||||
 | 
			
		||||
            b2FixtureDef fd;
 | 
			
		||||
            fd.shape = &shape;
 | 
			
		||||
            fd.density = 1.0f;
 | 
			
		||||
            fd.friction = 0.3f;
 | 
			
		||||
 | 
			
		||||
            for (int i = 0; i < e_rowCount; ++i)
 | 
			
		||||
            {
 | 
			
		||||
                b2BodyDef bd;
 | 
			
		||||
                bd.type = b2_dynamicBody;
 | 
			
		||||
 | 
			
		||||
                int32 n = j * e_rowCount + i;
 | 
			
		||||
                b2Assert(n < e_rowCount * e_columnCount);
 | 
			
		||||
                m_indices[n] = n;
 | 
			
		||||
                bd.userData = m_indices + n;
 | 
			
		||||
 | 
			
		||||
                float32 x = 0.0f;
 | 
			
		||||
                //float32 x = RandomFloat(-0.02f, 0.02f);
 | 
			
		||||
                //float32 x = i % 2 == 0 ? -0.025f : 0.025f;
 | 
			
		||||
                bd.position.Set(xs[j] + x, 0.752f + 1.54f * i);
 | 
			
		||||
                b2Body* body = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
                m_bodies[n] = body;
 | 
			
		||||
 | 
			
		||||
                body->CreateFixture(&fd);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        m_bullet = NULL;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Keyboard(unsigned char key)
 | 
			
		||||
    {
 | 
			
		||||
        switch (key)
 | 
			
		||||
        {
 | 
			
		||||
        case ',':
 | 
			
		||||
            if (m_bullet != NULL)
 | 
			
		||||
            {
 | 
			
		||||
                m_world->DestroyBody(m_bullet);
 | 
			
		||||
                m_bullet = NULL;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            {
 | 
			
		||||
                b2CircleShape shape;
 | 
			
		||||
                shape.m_radius = 0.25f;
 | 
			
		||||
 | 
			
		||||
                b2FixtureDef fd;
 | 
			
		||||
                fd.shape = &shape;
 | 
			
		||||
                fd.density = 20.0f;
 | 
			
		||||
                fd.restitution = 0.05f;
 | 
			
		||||
 | 
			
		||||
                b2BodyDef bd;
 | 
			
		||||
                bd.type = b2_dynamicBody;
 | 
			
		||||
                bd.bullet = true;
 | 
			
		||||
                bd.position.Set(-31.0f, 5.0f);
 | 
			
		||||
 | 
			
		||||
                m_bullet = m_world->CreateBody(&bd);
 | 
			
		||||
                m_bullet->CreateFixture(&fd);
 | 
			
		||||
 | 
			
		||||
                m_bullet->SetLinearVelocity(b2Vec2(400.0f, 0.0f));
 | 
			
		||||
            }
 | 
			
		||||
            break;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Step(Settings* settings)
 | 
			
		||||
    {
 | 
			
		||||
        Test::Step(settings);
 | 
			
		||||
        m_debugDraw.DrawString(5, m_textLine, "Press: (,) to launch a bullet.");
 | 
			
		||||
        m_textLine += 15;
 | 
			
		||||
 | 
			
		||||
        //if (m_stepCount == 300)
 | 
			
		||||
        //{
 | 
			
		||||
        //  if (m_bullet != NULL)
 | 
			
		||||
        //  {
 | 
			
		||||
        //      m_world->DestroyBody(m_bullet);
 | 
			
		||||
        //      m_bullet = NULL;
 | 
			
		||||
        //  }
 | 
			
		||||
 | 
			
		||||
        //  {
 | 
			
		||||
        //      b2CircleShape shape;
 | 
			
		||||
        //      shape.m_radius = 0.25f;
 | 
			
		||||
 | 
			
		||||
        //      b2FixtureDef fd;
 | 
			
		||||
        //      fd.shape = &shape;
 | 
			
		||||
        //      fd.density = 20.0f;
 | 
			
		||||
        //      fd.restitution = 0.05f;
 | 
			
		||||
 | 
			
		||||
        //      b2BodyDef bd;
 | 
			
		||||
        //      bd.type = b2_dynamicBody;
 | 
			
		||||
        //      bd.bullet = true;
 | 
			
		||||
        //      bd.position.Set(-31.0f, 5.0f);
 | 
			
		||||
 | 
			
		||||
        //      m_bullet = m_world->CreateBody(&bd);
 | 
			
		||||
        //      m_bullet->CreateFixture(&fd);
 | 
			
		||||
 | 
			
		||||
        //      m_bullet->SetLinearVelocity(b2Vec2(400.0f, 0.0f));
 | 
			
		||||
        //  }
 | 
			
		||||
        //}
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new VerticalStack;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    b2Body* m_bullet;
 | 
			
		||||
    b2Body* m_bodies[e_rowCount * e_columnCount];
 | 
			
		||||
    int32 m_indices[e_rowCount * e_columnCount];
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -1,209 +1,209 @@
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef WEB_H
 | 
			
		||||
#define WEB_H
 | 
			
		||||
 | 
			
		||||
// This tests distance joints, body destruction, and joint destruction.
 | 
			
		||||
class Web : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
    Web()
 | 
			
		||||
    {
 | 
			
		||||
        b2Body* ground = NULL;
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            ground = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2EdgeShape shape;
 | 
			
		||||
            shape.Set(b2Vec2(-40.0f, 0.0f), b2Vec2(40.0f, 0.0f));
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(0.5f, 0.5f);
 | 
			
		||||
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
 | 
			
		||||
            bd.position.Set(-5.0f, 5.0f);
 | 
			
		||||
            m_bodies[0] = m_world->CreateBody(&bd);
 | 
			
		||||
            m_bodies[0]->CreateFixture(&shape, 5.0f);
 | 
			
		||||
 | 
			
		||||
            bd.position.Set(5.0f, 5.0f);
 | 
			
		||||
            m_bodies[1] = m_world->CreateBody(&bd);
 | 
			
		||||
            m_bodies[1]->CreateFixture(&shape, 5.0f);
 | 
			
		||||
 | 
			
		||||
            bd.position.Set(5.0f, 15.0f);
 | 
			
		||||
            m_bodies[2] = m_world->CreateBody(&bd);
 | 
			
		||||
            m_bodies[2]->CreateFixture(&shape, 5.0f);
 | 
			
		||||
 | 
			
		||||
            bd.position.Set(-5.0f, 15.0f);
 | 
			
		||||
            m_bodies[3] = m_world->CreateBody(&bd);
 | 
			
		||||
            m_bodies[3]->CreateFixture(&shape, 5.0f);
 | 
			
		||||
 | 
			
		||||
            b2DistanceJointDef jd;
 | 
			
		||||
            b2Vec2 p1, p2, d;
 | 
			
		||||
 | 
			
		||||
            jd.frequencyHz = 2.0f;
 | 
			
		||||
            jd.dampingRatio = 0.0f;
 | 
			
		||||
 | 
			
		||||
            jd.bodyA = ground;
 | 
			
		||||
            jd.bodyB = m_bodies[0];
 | 
			
		||||
            jd.localAnchorA.Set(-10.0f, 0.0f);
 | 
			
		||||
            jd.localAnchorB.Set(-0.5f, -0.5f);
 | 
			
		||||
            p1 = jd.bodyA->GetWorldPoint(jd.localAnchorA);
 | 
			
		||||
            p2 = jd.bodyB->GetWorldPoint(jd.localAnchorB);
 | 
			
		||||
            d = p2 - p1;
 | 
			
		||||
            jd.length = d.Length();
 | 
			
		||||
            m_joints[0] = m_world->CreateJoint(&jd);
 | 
			
		||||
 | 
			
		||||
            jd.bodyA = ground;
 | 
			
		||||
            jd.bodyB = m_bodies[1];
 | 
			
		||||
            jd.localAnchorA.Set(10.0f, 0.0f);
 | 
			
		||||
            jd.localAnchorB.Set(0.5f, -0.5f);
 | 
			
		||||
            p1 = jd.bodyA->GetWorldPoint(jd.localAnchorA);
 | 
			
		||||
            p2 = jd.bodyB->GetWorldPoint(jd.localAnchorB);
 | 
			
		||||
            d = p2 - p1;
 | 
			
		||||
            jd.length = d.Length();
 | 
			
		||||
            m_joints[1] = m_world->CreateJoint(&jd);
 | 
			
		||||
 | 
			
		||||
            jd.bodyA = ground;
 | 
			
		||||
            jd.bodyB = m_bodies[2];
 | 
			
		||||
            jd.localAnchorA.Set(10.0f, 20.0f);
 | 
			
		||||
            jd.localAnchorB.Set(0.5f, 0.5f);
 | 
			
		||||
            p1 = jd.bodyA->GetWorldPoint(jd.localAnchorA);
 | 
			
		||||
            p2 = jd.bodyB->GetWorldPoint(jd.localAnchorB);
 | 
			
		||||
            d = p2 - p1;
 | 
			
		||||
            jd.length = d.Length();
 | 
			
		||||
            m_joints[2] = m_world->CreateJoint(&jd);
 | 
			
		||||
 | 
			
		||||
            jd.bodyA = ground;
 | 
			
		||||
            jd.bodyB = m_bodies[3];
 | 
			
		||||
            jd.localAnchorA.Set(-10.0f, 20.0f);
 | 
			
		||||
            jd.localAnchorB.Set(-0.5f, 0.5f);
 | 
			
		||||
            p1 = jd.bodyA->GetWorldPoint(jd.localAnchorA);
 | 
			
		||||
            p2 = jd.bodyB->GetWorldPoint(jd.localAnchorB);
 | 
			
		||||
            d = p2 - p1;
 | 
			
		||||
            jd.length = d.Length();
 | 
			
		||||
            m_joints[3] = m_world->CreateJoint(&jd);
 | 
			
		||||
 | 
			
		||||
            jd.bodyA = m_bodies[0];
 | 
			
		||||
            jd.bodyB = m_bodies[1];
 | 
			
		||||
            jd.localAnchorA.Set(0.5f, 0.0f);
 | 
			
		||||
            jd.localAnchorB.Set(-0.5f, 0.0f);;
 | 
			
		||||
            p1 = jd.bodyA->GetWorldPoint(jd.localAnchorA);
 | 
			
		||||
            p2 = jd.bodyB->GetWorldPoint(jd.localAnchorB);
 | 
			
		||||
            d = p2 - p1;
 | 
			
		||||
            jd.length = d.Length();
 | 
			
		||||
            m_joints[4] = m_world->CreateJoint(&jd);
 | 
			
		||||
 | 
			
		||||
            jd.bodyA = m_bodies[1];
 | 
			
		||||
            jd.bodyB = m_bodies[2];
 | 
			
		||||
            jd.localAnchorA.Set(0.0f, 0.5f);
 | 
			
		||||
            jd.localAnchorB.Set(0.0f, -0.5f);
 | 
			
		||||
            p1 = jd.bodyA->GetWorldPoint(jd.localAnchorA);
 | 
			
		||||
            p2 = jd.bodyB->GetWorldPoint(jd.localAnchorB);
 | 
			
		||||
            d = p2 - p1;
 | 
			
		||||
            jd.length = d.Length();
 | 
			
		||||
            m_joints[5] = m_world->CreateJoint(&jd);
 | 
			
		||||
 | 
			
		||||
            jd.bodyA = m_bodies[2];
 | 
			
		||||
            jd.bodyB = m_bodies[3];
 | 
			
		||||
            jd.localAnchorA.Set(-0.5f, 0.0f);
 | 
			
		||||
            jd.localAnchorB.Set(0.5f, 0.0f);
 | 
			
		||||
            p1 = jd.bodyA->GetWorldPoint(jd.localAnchorA);
 | 
			
		||||
            p2 = jd.bodyB->GetWorldPoint(jd.localAnchorB);
 | 
			
		||||
            d = p2 - p1;
 | 
			
		||||
            jd.length = d.Length();
 | 
			
		||||
            m_joints[6] = m_world->CreateJoint(&jd);
 | 
			
		||||
 | 
			
		||||
            jd.bodyA = m_bodies[3];
 | 
			
		||||
            jd.bodyB = m_bodies[0];
 | 
			
		||||
            jd.localAnchorA.Set(0.0f, -0.5f);
 | 
			
		||||
            jd.localAnchorB.Set(0.0f, 0.5f);
 | 
			
		||||
            p1 = jd.bodyA->GetWorldPoint(jd.localAnchorA);
 | 
			
		||||
            p2 = jd.bodyB->GetWorldPoint(jd.localAnchorB);
 | 
			
		||||
            d = p2 - p1;
 | 
			
		||||
            jd.length = d.Length();
 | 
			
		||||
            m_joints[7] = m_world->CreateJoint(&jd);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Keyboard(unsigned char key)
 | 
			
		||||
    {
 | 
			
		||||
        switch (key)
 | 
			
		||||
        {
 | 
			
		||||
        case 'b':
 | 
			
		||||
            for (int32 i = 0; i < 4; ++i)
 | 
			
		||||
            {
 | 
			
		||||
                if (m_bodies[i])
 | 
			
		||||
                {
 | 
			
		||||
                    m_world->DestroyBody(m_bodies[i]);
 | 
			
		||||
                    m_bodies[i] = NULL;
 | 
			
		||||
                    break;
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case 'j':
 | 
			
		||||
            for (int32 i = 0; i < 8; ++i)
 | 
			
		||||
            {
 | 
			
		||||
                if (m_joints[i])
 | 
			
		||||
                {
 | 
			
		||||
                    m_world->DestroyJoint(m_joints[i]);
 | 
			
		||||
                    m_joints[i] = NULL;
 | 
			
		||||
                    break;
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            break;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Step(Settings* settings)
 | 
			
		||||
    {
 | 
			
		||||
        Test::Step(settings);
 | 
			
		||||
        m_debugDraw.DrawString(5, m_textLine, "This demonstrates a soft distance joint.");
 | 
			
		||||
        m_textLine += 15;
 | 
			
		||||
        m_debugDraw.DrawString(5, m_textLine, "Press: (b) to delete a body, (j) to delete a joint");
 | 
			
		||||
        m_textLine += 15;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void JointDestroyed(b2Joint* joint)
 | 
			
		||||
    {
 | 
			
		||||
        for (int32 i = 0; i < 8; ++i)
 | 
			
		||||
        {
 | 
			
		||||
            if (m_joints[i] == joint)
 | 
			
		||||
            {
 | 
			
		||||
                m_joints[i] = NULL;
 | 
			
		||||
                break;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new Web;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    b2Body* m_bodies[4];
 | 
			
		||||
    b2Joint* m_joints[8];
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
/*
 | 
			
		||||
* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org
 | 
			
		||||
*
 | 
			
		||||
* This software is provided 'as-is', without any express or implied
 | 
			
		||||
* warranty.  In no event will the authors be held liable for any damages
 | 
			
		||||
* arising from the use of this software.
 | 
			
		||||
* Permission is granted to anyone to use this software for any purpose,
 | 
			
		||||
* including commercial applications, and to alter it and redistribute it
 | 
			
		||||
* freely, subject to the following restrictions:
 | 
			
		||||
* 1. The origin of this software must not be misrepresented; you must not
 | 
			
		||||
* claim that you wrote the original software. If you use this software
 | 
			
		||||
* in a product, an acknowledgment in the product documentation would be
 | 
			
		||||
* appreciated but is not required.
 | 
			
		||||
* 2. Altered source versions must be plainly marked as such, and must not be
 | 
			
		||||
* misrepresented as being the original software.
 | 
			
		||||
* 3. This notice may not be removed or altered from any source distribution.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef WEB_H
 | 
			
		||||
#define WEB_H
 | 
			
		||||
 | 
			
		||||
// This tests distance joints, body destruction, and joint destruction.
 | 
			
		||||
class Web : public Test
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
    Web()
 | 
			
		||||
    {
 | 
			
		||||
        b2Body* ground = NULL;
 | 
			
		||||
        {
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            ground = m_world->CreateBody(&bd);
 | 
			
		||||
 | 
			
		||||
            b2EdgeShape shape;
 | 
			
		||||
            shape.Set(b2Vec2(-40.0f, 0.0f), b2Vec2(40.0f, 0.0f));
 | 
			
		||||
            ground->CreateFixture(&shape, 0.0f);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            b2PolygonShape shape;
 | 
			
		||||
            shape.SetAsBox(0.5f, 0.5f);
 | 
			
		||||
 | 
			
		||||
            b2BodyDef bd;
 | 
			
		||||
            bd.type = b2_dynamicBody;
 | 
			
		||||
 | 
			
		||||
            bd.position.Set(-5.0f, 5.0f);
 | 
			
		||||
            m_bodies[0] = m_world->CreateBody(&bd);
 | 
			
		||||
            m_bodies[0]->CreateFixture(&shape, 5.0f);
 | 
			
		||||
 | 
			
		||||
            bd.position.Set(5.0f, 5.0f);
 | 
			
		||||
            m_bodies[1] = m_world->CreateBody(&bd);
 | 
			
		||||
            m_bodies[1]->CreateFixture(&shape, 5.0f);
 | 
			
		||||
 | 
			
		||||
            bd.position.Set(5.0f, 15.0f);
 | 
			
		||||
            m_bodies[2] = m_world->CreateBody(&bd);
 | 
			
		||||
            m_bodies[2]->CreateFixture(&shape, 5.0f);
 | 
			
		||||
 | 
			
		||||
            bd.position.Set(-5.0f, 15.0f);
 | 
			
		||||
            m_bodies[3] = m_world->CreateBody(&bd);
 | 
			
		||||
            m_bodies[3]->CreateFixture(&shape, 5.0f);
 | 
			
		||||
 | 
			
		||||
            b2DistanceJointDef jd;
 | 
			
		||||
            b2Vec2 p1, p2, d;
 | 
			
		||||
 | 
			
		||||
            jd.frequencyHz = 2.0f;
 | 
			
		||||
            jd.dampingRatio = 0.0f;
 | 
			
		||||
 | 
			
		||||
            jd.bodyA = ground;
 | 
			
		||||
            jd.bodyB = m_bodies[0];
 | 
			
		||||
            jd.localAnchorA.Set(-10.0f, 0.0f);
 | 
			
		||||
            jd.localAnchorB.Set(-0.5f, -0.5f);
 | 
			
		||||
            p1 = jd.bodyA->GetWorldPoint(jd.localAnchorA);
 | 
			
		||||
            p2 = jd.bodyB->GetWorldPoint(jd.localAnchorB);
 | 
			
		||||
            d = p2 - p1;
 | 
			
		||||
            jd.length = d.Length();
 | 
			
		||||
            m_joints[0] = m_world->CreateJoint(&jd);
 | 
			
		||||
 | 
			
		||||
            jd.bodyA = ground;
 | 
			
		||||
            jd.bodyB = m_bodies[1];
 | 
			
		||||
            jd.localAnchorA.Set(10.0f, 0.0f);
 | 
			
		||||
            jd.localAnchorB.Set(0.5f, -0.5f);
 | 
			
		||||
            p1 = jd.bodyA->GetWorldPoint(jd.localAnchorA);
 | 
			
		||||
            p2 = jd.bodyB->GetWorldPoint(jd.localAnchorB);
 | 
			
		||||
            d = p2 - p1;
 | 
			
		||||
            jd.length = d.Length();
 | 
			
		||||
            m_joints[1] = m_world->CreateJoint(&jd);
 | 
			
		||||
 | 
			
		||||
            jd.bodyA = ground;
 | 
			
		||||
            jd.bodyB = m_bodies[2];
 | 
			
		||||
            jd.localAnchorA.Set(10.0f, 20.0f);
 | 
			
		||||
            jd.localAnchorB.Set(0.5f, 0.5f);
 | 
			
		||||
            p1 = jd.bodyA->GetWorldPoint(jd.localAnchorA);
 | 
			
		||||
            p2 = jd.bodyB->GetWorldPoint(jd.localAnchorB);
 | 
			
		||||
            d = p2 - p1;
 | 
			
		||||
            jd.length = d.Length();
 | 
			
		||||
            m_joints[2] = m_world->CreateJoint(&jd);
 | 
			
		||||
 | 
			
		||||
            jd.bodyA = ground;
 | 
			
		||||
            jd.bodyB = m_bodies[3];
 | 
			
		||||
            jd.localAnchorA.Set(-10.0f, 20.0f);
 | 
			
		||||
            jd.localAnchorB.Set(-0.5f, 0.5f);
 | 
			
		||||
            p1 = jd.bodyA->GetWorldPoint(jd.localAnchorA);
 | 
			
		||||
            p2 = jd.bodyB->GetWorldPoint(jd.localAnchorB);
 | 
			
		||||
            d = p2 - p1;
 | 
			
		||||
            jd.length = d.Length();
 | 
			
		||||
            m_joints[3] = m_world->CreateJoint(&jd);
 | 
			
		||||
 | 
			
		||||
            jd.bodyA = m_bodies[0];
 | 
			
		||||
            jd.bodyB = m_bodies[1];
 | 
			
		||||
            jd.localAnchorA.Set(0.5f, 0.0f);
 | 
			
		||||
            jd.localAnchorB.Set(-0.5f, 0.0f);;
 | 
			
		||||
            p1 = jd.bodyA->GetWorldPoint(jd.localAnchorA);
 | 
			
		||||
            p2 = jd.bodyB->GetWorldPoint(jd.localAnchorB);
 | 
			
		||||
            d = p2 - p1;
 | 
			
		||||
            jd.length = d.Length();
 | 
			
		||||
            m_joints[4] = m_world->CreateJoint(&jd);
 | 
			
		||||
 | 
			
		||||
            jd.bodyA = m_bodies[1];
 | 
			
		||||
            jd.bodyB = m_bodies[2];
 | 
			
		||||
            jd.localAnchorA.Set(0.0f, 0.5f);
 | 
			
		||||
            jd.localAnchorB.Set(0.0f, -0.5f);
 | 
			
		||||
            p1 = jd.bodyA->GetWorldPoint(jd.localAnchorA);
 | 
			
		||||
            p2 = jd.bodyB->GetWorldPoint(jd.localAnchorB);
 | 
			
		||||
            d = p2 - p1;
 | 
			
		||||
            jd.length = d.Length();
 | 
			
		||||
            m_joints[5] = m_world->CreateJoint(&jd);
 | 
			
		||||
 | 
			
		||||
            jd.bodyA = m_bodies[2];
 | 
			
		||||
            jd.bodyB = m_bodies[3];
 | 
			
		||||
            jd.localAnchorA.Set(-0.5f, 0.0f);
 | 
			
		||||
            jd.localAnchorB.Set(0.5f, 0.0f);
 | 
			
		||||
            p1 = jd.bodyA->GetWorldPoint(jd.localAnchorA);
 | 
			
		||||
            p2 = jd.bodyB->GetWorldPoint(jd.localAnchorB);
 | 
			
		||||
            d = p2 - p1;
 | 
			
		||||
            jd.length = d.Length();
 | 
			
		||||
            m_joints[6] = m_world->CreateJoint(&jd);
 | 
			
		||||
 | 
			
		||||
            jd.bodyA = m_bodies[3];
 | 
			
		||||
            jd.bodyB = m_bodies[0];
 | 
			
		||||
            jd.localAnchorA.Set(0.0f, -0.5f);
 | 
			
		||||
            jd.localAnchorB.Set(0.0f, 0.5f);
 | 
			
		||||
            p1 = jd.bodyA->GetWorldPoint(jd.localAnchorA);
 | 
			
		||||
            p2 = jd.bodyB->GetWorldPoint(jd.localAnchorB);
 | 
			
		||||
            d = p2 - p1;
 | 
			
		||||
            jd.length = d.Length();
 | 
			
		||||
            m_joints[7] = m_world->CreateJoint(&jd);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Keyboard(unsigned char key)
 | 
			
		||||
    {
 | 
			
		||||
        switch (key)
 | 
			
		||||
        {
 | 
			
		||||
        case 'b':
 | 
			
		||||
            for (int32 i = 0; i < 4; ++i)
 | 
			
		||||
            {
 | 
			
		||||
                if (m_bodies[i])
 | 
			
		||||
                {
 | 
			
		||||
                    m_world->DestroyBody(m_bodies[i]);
 | 
			
		||||
                    m_bodies[i] = NULL;
 | 
			
		||||
                    break;
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            break;
 | 
			
		||||
 | 
			
		||||
        case 'j':
 | 
			
		||||
            for (int32 i = 0; i < 8; ++i)
 | 
			
		||||
            {
 | 
			
		||||
                if (m_joints[i])
 | 
			
		||||
                {
 | 
			
		||||
                    m_world->DestroyJoint(m_joints[i]);
 | 
			
		||||
                    m_joints[i] = NULL;
 | 
			
		||||
                    break;
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            break;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void Step(Settings* settings)
 | 
			
		||||
    {
 | 
			
		||||
        Test::Step(settings);
 | 
			
		||||
        m_debugDraw.DrawString(5, m_textLine, "This demonstrates a soft distance joint.");
 | 
			
		||||
        m_textLine += 15;
 | 
			
		||||
        m_debugDraw.DrawString(5, m_textLine, "Press: (b) to delete a body, (j) to delete a joint");
 | 
			
		||||
        m_textLine += 15;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void JointDestroyed(b2Joint* joint)
 | 
			
		||||
    {
 | 
			
		||||
        for (int32 i = 0; i < 8; ++i)
 | 
			
		||||
        {
 | 
			
		||||
            if (m_joints[i] == joint)
 | 
			
		||||
            {
 | 
			
		||||
                m_joints[i] = NULL;
 | 
			
		||||
                break;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Test* Create()
 | 
			
		||||
    {
 | 
			
		||||
        return new Web;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    b2Body* m_bodies[4];
 | 
			
		||||
    b2Joint* m_joints[8];
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -1,246 +1,245 @@
 | 
			
		||||
/*
 | 
			
		||||
  ==============================================================================
 | 
			
		||||
 | 
			
		||||
   This file is part of the JUCE examples.
 | 
			
		||||
   Copyright (c) 2020 - Raw Material Software Limited
 | 
			
		||||
 | 
			
		||||
   The code included in this file is provided under the terms of the ISC license
 | 
			
		||||
   http://www.isc.org/downloads/software-support-policy/isc-license. Permission
 | 
			
		||||
   To use, copy, modify, and/or distribute this software for any purpose with or
 | 
			
		||||
   without fee is hereby granted provided that the above copyright notice and
 | 
			
		||||
   this permission notice appear in all copies.
 | 
			
		||||
 | 
			
		||||
   THE SOFTWARE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES,
 | 
			
		||||
   WHETHER EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR
 | 
			
		||||
   PURPOSE, ARE DISCLAIMED.
 | 
			
		||||
 | 
			
		||||
  ==============================================================================
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
#include <JuceHeader.h>
 | 
			
		||||
 | 
			
		||||
#ifndef PIP_DEMO_UTILITIES_INCLUDED
 | 
			
		||||
 #define PIP_DEMO_UTILITIES_INCLUDED 1
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
//==============================================================================
 | 
			
		||||
/*
 | 
			
		||||
    This file contains a bunch of miscellaneous utilities that are
 | 
			
		||||
    used by the various demos.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
//==============================================================================
 | 
			
		||||
inline Colour getRandomColour (float brightness) noexcept
 | 
			
		||||
{
 | 
			
		||||
    return Colour::fromHSV (Random::getSystemRandom().nextFloat(), 0.5f, brightness, 1.0f);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
inline Colour getRandomBrightColour() noexcept  { return getRandomColour (0.8f); }
 | 
			
		||||
inline Colour getRandomDarkColour() noexcept    { return getRandomColour (0.3f); }
 | 
			
		||||
 | 
			
		||||
inline Colour getUIColourIfAvailable (LookAndFeel_V4::ColourScheme::UIColour uiColour, Colour fallback = Colour (0xff4d4d4d)) noexcept
 | 
			
		||||
{
 | 
			
		||||
    if (auto* v4 = dynamic_cast<LookAndFeel_V4*> (&LookAndFeel::getDefaultLookAndFeel()))
 | 
			
		||||
        return v4->getCurrentColourScheme().getUIColour (uiColour);
 | 
			
		||||
 | 
			
		||||
    return fallback;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
inline File getExamplesDirectory() noexcept
 | 
			
		||||
{
 | 
			
		||||
   #ifdef PIP_JUCE_EXAMPLES_DIRECTORY
 | 
			
		||||
    MemoryOutputStream mo;
 | 
			
		||||
 | 
			
		||||
    auto success = Base64::convertFromBase64 (mo, JUCE_STRINGIFY (PIP_JUCE_EXAMPLES_DIRECTORY));
 | 
			
		||||
    ignoreUnused (success);
 | 
			
		||||
    jassert (success);
 | 
			
		||||
 | 
			
		||||
    return mo.toString();
 | 
			
		||||
   #elif defined PIP_JUCE_EXAMPLES_DIRECTORY_STRING
 | 
			
		||||
    return File { CharPointer_UTF8 { PIP_JUCE_EXAMPLES_DIRECTORY_STRING } };
 | 
			
		||||
   #else
 | 
			
		||||
    auto currentFile = File::getSpecialLocation (File::SpecialLocationType::currentApplicationFile);
 | 
			
		||||
    auto exampleDir = currentFile.getParentDirectory().getChildFile ("examples");
 | 
			
		||||
 | 
			
		||||
    if (exampleDir.exists())
 | 
			
		||||
        return exampleDir;
 | 
			
		||||
 | 
			
		||||
    // keep track of the number of parent directories so we don't go on endlessly
 | 
			
		||||
    for (int numTries = 0; numTries < 15; ++numTries)
 | 
			
		||||
    {
 | 
			
		||||
        if (currentFile.getFileName() == "examples")
 | 
			
		||||
            return currentFile;
 | 
			
		||||
 | 
			
		||||
        const auto sibling = currentFile.getSiblingFile ("examples");
 | 
			
		||||
 | 
			
		||||
        if (sibling.exists())
 | 
			
		||||
            return sibling;
 | 
			
		||||
 | 
			
		||||
        currentFile = currentFile.getParentDirectory();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    return currentFile;
 | 
			
		||||
   #endif
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
inline std::unique_ptr<InputStream> createAssetInputStream (const char* resourcePath)
 | 
			
		||||
{
 | 
			
		||||
  #if JUCE_ANDROID
 | 
			
		||||
    ZipFile apkZip (File::getSpecialLocation (File::invokedExecutableFile));
 | 
			
		||||
    return std::unique_ptr<InputStream> (apkZip.createStreamForEntry (apkZip.getIndexOfFileName ("assets/" + String (resourcePath))));
 | 
			
		||||
  #else
 | 
			
		||||
   #if JUCE_IOS
 | 
			
		||||
    auto assetsDir = File::getSpecialLocation (File::currentExecutableFile)
 | 
			
		||||
                          .getParentDirectory().getChildFile ("Assets");
 | 
			
		||||
   #elif JUCE_MAC
 | 
			
		||||
    auto assetsDir = File::getSpecialLocation (File::currentExecutableFile)
 | 
			
		||||
                          .getParentDirectory().getParentDirectory().getChildFile ("Resources").getChildFile ("Assets");
 | 
			
		||||
 | 
			
		||||
    if (! assetsDir.exists())
 | 
			
		||||
        assetsDir = getExamplesDirectory().getChildFile ("Assets");
 | 
			
		||||
   #else
 | 
			
		||||
    auto assetsDir = getExamplesDirectory().getChildFile ("Assets");
 | 
			
		||||
   #endif
 | 
			
		||||
 | 
			
		||||
    auto resourceFile = assetsDir.getChildFile (resourcePath);
 | 
			
		||||
    jassert (resourceFile.existsAsFile());
 | 
			
		||||
 | 
			
		||||
    return resourceFile.createInputStream();
 | 
			
		||||
  #endif
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
inline Image getImageFromAssets (const char* assetName)
 | 
			
		||||
{
 | 
			
		||||
    auto hashCode = (String (assetName) + "@juce_demo_assets").hashCode64();
 | 
			
		||||
    auto img = ImageCache::getFromHashCode (hashCode);
 | 
			
		||||
 | 
			
		||||
    if (img.isNull())
 | 
			
		||||
    {
 | 
			
		||||
        std::unique_ptr<InputStream> juceIconStream (createAssetInputStream (assetName));
 | 
			
		||||
 | 
			
		||||
        if (juceIconStream == nullptr)
 | 
			
		||||
            return {};
 | 
			
		||||
 | 
			
		||||
        img = ImageFileFormat::loadFrom (*juceIconStream);
 | 
			
		||||
 | 
			
		||||
        ImageCache::addImageToCache (img, hashCode);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    return img;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
inline String loadEntireAssetIntoString (const char* assetName)
 | 
			
		||||
{
 | 
			
		||||
    std::unique_ptr<InputStream> input (createAssetInputStream (assetName));
 | 
			
		||||
 | 
			
		||||
    if (input == nullptr)
 | 
			
		||||
        return {};
 | 
			
		||||
 | 
			
		||||
    return input->readString();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
//==============================================================================
 | 
			
		||||
inline Path getJUCELogoPath()
 | 
			
		||||
{
 | 
			
		||||
    return Drawable::parseSVGPath (
 | 
			
		||||
        "M72.87 84.28A42.36 42.36 0 0130.4 42.14a42.48 42.48 0 0184.95 0 42.36 42.36 0 01-42.48 42.14zm0-78.67A36.74 36.74 0 0036 42.14a36.88 36.88 0 0073.75 0A36.75 36.75 0 0072.87 5.61z"
 | 
			
		||||
        "M77.62 49.59a177.77 177.77 0 008.74 18.93A4.38 4.38 0 0092.69 70a34.5 34.5 0 008.84-9 4.3 4.3 0 00-2.38-6.49A176.73 176.73 0 0180 47.32a1.78 1.78 0 00-2.38 2.27zM81.05 44.27a169.68 169.68 0 0020.13 7.41 4.39 4.39 0 005.52-3.41 34.42 34.42 0 00.55-6.13 33.81 33.81 0 00-.67-6.72 4.37 4.37 0 00-6.31-3A192.32 192.32 0 0181.1 41a1.76 1.76 0 00-.05 3.27zM74.47 50.44a1.78 1.78 0 00-3.29 0 165.54 165.54 0 00-7.46 19.89 4.33 4.33 0 003.47 5.48 35.49 35.49 0 005.68.46 34.44 34.44 0 007.13-.79 4.32 4.32 0 003-6.25 187.83 187.83 0 01-8.53-18.79zM71.59 34.12a1.78 1.78 0 003.29.05 163.9 163.9 0 007.52-20.11A4.34 4.34 0 0079 8.59a35.15 35.15 0 00-13.06.17 4.32 4.32 0 00-3 6.26 188.41 188.41 0 018.65 19.1zM46.32 30.3a176.2 176.2 0 0120 7.48 1.78 1.78 0 002.37-2.28 180.72 180.72 0 00-9.13-19.84 4.38 4.38 0 00-6.33-1.47 34.27 34.27 0 00-9.32 9.65 4.31 4.31 0 002.41 6.46zM68.17 49.18a1.77 1.77 0 00-2.29-2.34 181.71 181.71 0 00-19.51 8.82A4.3 4.3 0 0044.91 62a34.36 34.36 0 009.42 8.88 4.36 4.36 0 006.5-2.38 175.11 175.11 0 017.34-19.32zM77.79 35.59a1.78 1.78 0 002.3 2.35 182.51 182.51 0 0019.6-8.88 4.3 4.3 0 001.5-6.25 34.4 34.4 0 00-9.41-9.14A4.36 4.36 0 0085.24 16a174.51 174.51 0 01-7.45 19.59zM64.69 40.6a167.72 167.72 0 00-20.22-7.44A4.36 4.36 0 0039 36.6a33.68 33.68 0 00-.45 5.54 34 34 0 00.81 7.4 4.36 4.36 0 006.28 2.84 189.19 189.19 0 0119-8.52 1.76 1.76 0 00.05-3.26zM20 129.315c0 5-2.72 8.16-7.11 8.16-2.37 0-4.17-1-6.2-3.56l-.69-.78-6 5 .57.76c3.25 4.36 7.16 6.39 12.31 6.39 9 0 15.34-6.57 15.34-16v-28.1H20zM61.69 126.505c0 6.66-3.76 11-9.57 11-5.81 0-9.56-4.31-9.56-11v-25.32h-8.23v25.69c0 10.66 7.4 18.4 17.6 18.4 10 0 17.61-7.72 18-18.4v-25.69h-8.24zM106.83 134.095c-3.58 2.43-6.18 3.38-9.25 3.38a14.53 14.53 0 010-29c3.24 0 5.66.88 9.25 3.38l.76.53 4.78-6-.75-.62a22.18 22.18 0 00-14.22-5.1 22.33 22.33 0 100 44.65 21.53 21.53 0 0014.39-5.08l.81-.64-5-6zM145.75 137.285h-19.06v-10.72h18.3v-7.61h-18.3v-10.16h19.06v-7.61h-27.28v43.53h27.28z"
 | 
			
		||||
        "M68.015 83.917c-7.723-.902-15.472-4.123-21.566-8.966-8.475-6.736-14.172-16.823-15.574-27.575C29.303 35.31 33.538 22.7 42.21 13.631 49.154 6.368 58.07 1.902 68.042.695c2.15-.26 7.524-.26 9.675 0 12.488 1.512 23.464 8.25 30.437 18.686 8.332 12.471 9.318 28.123 2.605 41.368-2.28 4.5-4.337 7.359-7.85 10.909A42.273 42.273 0 0177.613 83.92c-2.027.227-7.644.225-9.598-.003zm7.823-5.596c8.435-.415 17.446-4.678 23.683-11.205 5.976-6.254 9.35-13.723 10.181-22.537.632-6.705-1.346-14.948-5.065-21.108C98.88 13.935 89.397 7.602 78.34 5.906c-2.541-.39-8.398-.386-10.96.006C53.54 8.034 42.185 17.542 37.81 30.67c-2.807 8.426-2.421 17.267 1.11 25.444 4.877 11.297 14.959 19.41 26.977 21.709 2.136.408 6.1.755 7.377.645.325-.028 1.48-.094 2.564-.147z"
 | 
			
		||||
  );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
//==============================================================================
 | 
			
		||||
#if JUCE_MODULE_AVAILABLE_juce_gui_extra
 | 
			
		||||
 inline CodeEditorComponent::ColourScheme getDarkCodeEditorColourScheme()
 | 
			
		||||
 {
 | 
			
		||||
     struct Type
 | 
			
		||||
     {
 | 
			
		||||
         const char* name;
 | 
			
		||||
         juce::uint32 colour;
 | 
			
		||||
     };
 | 
			
		||||
 | 
			
		||||
     const Type types[] =
 | 
			
		||||
     {
 | 
			
		||||
         { "Error",              0xffe60000 },
 | 
			
		||||
         { "Comment",            0xff72d20c },
 | 
			
		||||
         { "Keyword",            0xffee6f6f },
 | 
			
		||||
         { "Operator",           0xffc4eb19 },
 | 
			
		||||
         { "Identifier",         0xffcfcfcf },
 | 
			
		||||
         { "Integer",            0xff42c8c4 },
 | 
			
		||||
         { "Float",              0xff885500 },
 | 
			
		||||
         { "String",             0xffbc45dd },
 | 
			
		||||
         { "Bracket",            0xff058202 },
 | 
			
		||||
         { "Punctuation",        0xffcfbeff },
 | 
			
		||||
         { "Preprocessor Text",  0xfff8f631 }
 | 
			
		||||
     };
 | 
			
		||||
 | 
			
		||||
     CodeEditorComponent::ColourScheme cs;
 | 
			
		||||
 | 
			
		||||
     for (auto& t : types)
 | 
			
		||||
         cs.set (t.name, Colour (t.colour));
 | 
			
		||||
 | 
			
		||||
     return cs;
 | 
			
		||||
 }
 | 
			
		||||
 | 
			
		||||
 inline CodeEditorComponent::ColourScheme getLightCodeEditorColourScheme()
 | 
			
		||||
 {
 | 
			
		||||
     struct Type
 | 
			
		||||
     {
 | 
			
		||||
         const char* name;
 | 
			
		||||
         juce::uint32 colour;
 | 
			
		||||
     };
 | 
			
		||||
 | 
			
		||||
     const Type types[] =
 | 
			
		||||
     {
 | 
			
		||||
         { "Error",              0xffcc0000 },
 | 
			
		||||
         { "Comment",            0xff00aa00 },
 | 
			
		||||
         { "Keyword",            0xff0000cc },
 | 
			
		||||
         { "Operator",           0xff225500 },
 | 
			
		||||
         { "Identifier",         0xff000000 },
 | 
			
		||||
         { "Integer",            0xff880000 },
 | 
			
		||||
         { "Float",              0xff885500 },
 | 
			
		||||
         { "String",             0xff990099 },
 | 
			
		||||
         { "Bracket",            0xff000055 },
 | 
			
		||||
         { "Punctuation",        0xff004400 },
 | 
			
		||||
         { "Preprocessor Text",  0xff660000 }
 | 
			
		||||
     };
 | 
			
		||||
 | 
			
		||||
     CodeEditorComponent::ColourScheme cs;
 | 
			
		||||
 | 
			
		||||
     for (auto& t : types)
 | 
			
		||||
         cs.set (t.name, Colour (t.colour));
 | 
			
		||||
 | 
			
		||||
     return cs;
 | 
			
		||||
 }
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
//==============================================================================
 | 
			
		||||
// This is basically a sawtooth wave generator - maps a value that bounces between
 | 
			
		||||
// 0.0 and 1.0 at a random speed
 | 
			
		||||
struct BouncingNumber
 | 
			
		||||
{
 | 
			
		||||
    BouncingNumber()
 | 
			
		||||
        : speed (0.0004 + 0.0007 * Random::getSystemRandom().nextDouble()),
 | 
			
		||||
          phase (Random::getSystemRandom().nextDouble())
 | 
			
		||||
    {
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    float getValue() const
 | 
			
		||||
    {
 | 
			
		||||
        double v = fmod (phase + speed * Time::getMillisecondCounterHiRes(), 2.0);
 | 
			
		||||
        return (float) (v >= 1.0 ? (2.0 - v) : v);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
protected:
 | 
			
		||||
    double speed, phase;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
struct SlowerBouncingNumber  : public BouncingNumber
 | 
			
		||||
{
 | 
			
		||||
    SlowerBouncingNumber()
 | 
			
		||||
    {
 | 
			
		||||
        speed *= 0.3;
 | 
			
		||||
    }
 | 
			
		||||
};
 | 
			
		||||
/*
 | 
			
		||||
  ==============================================================================
 | 
			
		||||
 | 
			
		||||
   This file is part of the JUCE examples.
 | 
			
		||||
   Copyright (c) 2022 - Raw Material Software Limited
 | 
			
		||||
 | 
			
		||||
   The code included in this file is provided under the terms of the ISC license
 | 
			
		||||
   http://www.isc.org/downloads/software-support-policy/isc-license. Permission
 | 
			
		||||
   To use, copy, modify, and/or distribute this software for any purpose with or
 | 
			
		||||
   without fee is hereby granted provided that the above copyright notice and
 | 
			
		||||
   this permission notice appear in all copies.
 | 
			
		||||
 | 
			
		||||
   THE SOFTWARE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES,
 | 
			
		||||
   WHETHER EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR
 | 
			
		||||
   PURPOSE, ARE DISCLAIMED.
 | 
			
		||||
 | 
			
		||||
  ==============================================================================
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef PIP_DEMO_UTILITIES_INCLUDED
 | 
			
		||||
#define PIP_DEMO_UTILITIES_INCLUDED 1
 | 
			
		||||
 | 
			
		||||
#include <JuceHeader.h>
 | 
			
		||||
 | 
			
		||||
//==============================================================================
 | 
			
		||||
/*
 | 
			
		||||
    This file contains a bunch of miscellaneous utilities that are
 | 
			
		||||
    used by the various demos.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
//==============================================================================
 | 
			
		||||
inline Colour getRandomColour (float brightness) noexcept
 | 
			
		||||
{
 | 
			
		||||
    return Colour::fromHSV (Random::getSystemRandom().nextFloat(), 0.5f, brightness, 1.0f);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
inline Colour getRandomBrightColour() noexcept  { return getRandomColour (0.8f); }
 | 
			
		||||
inline Colour getRandomDarkColour() noexcept    { return getRandomColour (0.3f); }
 | 
			
		||||
 | 
			
		||||
inline Colour getUIColourIfAvailable (LookAndFeel_V4::ColourScheme::UIColour uiColour, Colour fallback = Colour (0xff4d4d4d)) noexcept
 | 
			
		||||
{
 | 
			
		||||
    if (auto* v4 = dynamic_cast<LookAndFeel_V4*> (&LookAndFeel::getDefaultLookAndFeel()))
 | 
			
		||||
        return v4->getCurrentColourScheme().getUIColour (uiColour);
 | 
			
		||||
 | 
			
		||||
    return fallback;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
inline File getExamplesDirectory() noexcept
 | 
			
		||||
{
 | 
			
		||||
   #ifdef PIP_JUCE_EXAMPLES_DIRECTORY
 | 
			
		||||
    MemoryOutputStream mo;
 | 
			
		||||
 | 
			
		||||
    auto success = Base64::convertFromBase64 (mo, JUCE_STRINGIFY (PIP_JUCE_EXAMPLES_DIRECTORY));
 | 
			
		||||
    ignoreUnused (success);
 | 
			
		||||
    jassert (success);
 | 
			
		||||
 | 
			
		||||
    return mo.toString();
 | 
			
		||||
   #elif defined PIP_JUCE_EXAMPLES_DIRECTORY_STRING
 | 
			
		||||
    return File { CharPointer_UTF8 { PIP_JUCE_EXAMPLES_DIRECTORY_STRING } };
 | 
			
		||||
   #else
 | 
			
		||||
    auto currentFile = File::getSpecialLocation (File::SpecialLocationType::currentApplicationFile);
 | 
			
		||||
    auto exampleDir = currentFile.getParentDirectory().getChildFile ("examples");
 | 
			
		||||
 | 
			
		||||
    if (exampleDir.exists())
 | 
			
		||||
        return exampleDir;
 | 
			
		||||
 | 
			
		||||
    // keep track of the number of parent directories so we don't go on endlessly
 | 
			
		||||
    for (int numTries = 0; numTries < 15; ++numTries)
 | 
			
		||||
    {
 | 
			
		||||
        if (currentFile.getFileName() == "examples")
 | 
			
		||||
            return currentFile;
 | 
			
		||||
 | 
			
		||||
        const auto sibling = currentFile.getSiblingFile ("examples");
 | 
			
		||||
 | 
			
		||||
        if (sibling.exists())
 | 
			
		||||
            return sibling;
 | 
			
		||||
 | 
			
		||||
        currentFile = currentFile.getParentDirectory();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    return currentFile;
 | 
			
		||||
   #endif
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
inline std::unique_ptr<InputStream> createAssetInputStream (const char* resourcePath)
 | 
			
		||||
{
 | 
			
		||||
  #if JUCE_ANDROID
 | 
			
		||||
    ZipFile apkZip (File::getSpecialLocation (File::invokedExecutableFile));
 | 
			
		||||
    return std::unique_ptr<InputStream> (apkZip.createStreamForEntry (apkZip.getIndexOfFileName ("assets/" + String (resourcePath))));
 | 
			
		||||
  #else
 | 
			
		||||
   #if JUCE_IOS
 | 
			
		||||
    auto assetsDir = File::getSpecialLocation (File::currentExecutableFile)
 | 
			
		||||
                          .getParentDirectory().getChildFile ("Assets");
 | 
			
		||||
   #elif JUCE_MAC
 | 
			
		||||
    auto assetsDir = File::getSpecialLocation (File::currentExecutableFile)
 | 
			
		||||
                          .getParentDirectory().getParentDirectory().getChildFile ("Resources").getChildFile ("Assets");
 | 
			
		||||
 | 
			
		||||
    if (! assetsDir.exists())
 | 
			
		||||
        assetsDir = getExamplesDirectory().getChildFile ("Assets");
 | 
			
		||||
   #else
 | 
			
		||||
    auto assetsDir = getExamplesDirectory().getChildFile ("Assets");
 | 
			
		||||
   #endif
 | 
			
		||||
 | 
			
		||||
    auto resourceFile = assetsDir.getChildFile (resourcePath);
 | 
			
		||||
    jassert (resourceFile.existsAsFile());
 | 
			
		||||
 | 
			
		||||
    return resourceFile.createInputStream();
 | 
			
		||||
  #endif
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
inline Image getImageFromAssets (const char* assetName)
 | 
			
		||||
{
 | 
			
		||||
    auto hashCode = (String (assetName) + "@juce_demo_assets").hashCode64();
 | 
			
		||||
    auto img = ImageCache::getFromHashCode (hashCode);
 | 
			
		||||
 | 
			
		||||
    if (img.isNull())
 | 
			
		||||
    {
 | 
			
		||||
        std::unique_ptr<InputStream> juceIconStream (createAssetInputStream (assetName));
 | 
			
		||||
 | 
			
		||||
        if (juceIconStream == nullptr)
 | 
			
		||||
            return {};
 | 
			
		||||
 | 
			
		||||
        img = ImageFileFormat::loadFrom (*juceIconStream);
 | 
			
		||||
 | 
			
		||||
        ImageCache::addImageToCache (img, hashCode);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    return img;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
inline String loadEntireAssetIntoString (const char* assetName)
 | 
			
		||||
{
 | 
			
		||||
    std::unique_ptr<InputStream> input (createAssetInputStream (assetName));
 | 
			
		||||
 | 
			
		||||
    if (input == nullptr)
 | 
			
		||||
        return {};
 | 
			
		||||
 | 
			
		||||
    return input->readString();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
//==============================================================================
 | 
			
		||||
inline Path getJUCELogoPath()
 | 
			
		||||
{
 | 
			
		||||
    return Drawable::parseSVGPath (
 | 
			
		||||
        "M72.87 84.28A42.36 42.36 0 0130.4 42.14a42.48 42.48 0 0184.95 0 42.36 42.36 0 01-42.48 42.14zm0-78.67A36.74 36.74 0 0036 42.14a36.88 36.88 0 0073.75 0A36.75 36.75 0 0072.87 5.61z"
 | 
			
		||||
        "M77.62 49.59a177.77 177.77 0 008.74 18.93A4.38 4.38 0 0092.69 70a34.5 34.5 0 008.84-9 4.3 4.3 0 00-2.38-6.49A176.73 176.73 0 0180 47.32a1.78 1.78 0 00-2.38 2.27zM81.05 44.27a169.68 169.68 0 0020.13 7.41 4.39 4.39 0 005.52-3.41 34.42 34.42 0 00.55-6.13 33.81 33.81 0 00-.67-6.72 4.37 4.37 0 00-6.31-3A192.32 192.32 0 0181.1 41a1.76 1.76 0 00-.05 3.27zM74.47 50.44a1.78 1.78 0 00-3.29 0 165.54 165.54 0 00-7.46 19.89 4.33 4.33 0 003.47 5.48 35.49 35.49 0 005.68.46 34.44 34.44 0 007.13-.79 4.32 4.32 0 003-6.25 187.83 187.83 0 01-8.53-18.79zM71.59 34.12a1.78 1.78 0 003.29.05 163.9 163.9 0 007.52-20.11A4.34 4.34 0 0079 8.59a35.15 35.15 0 00-13.06.17 4.32 4.32 0 00-3 6.26 188.41 188.41 0 018.65 19.1zM46.32 30.3a176.2 176.2 0 0120 7.48 1.78 1.78 0 002.37-2.28 180.72 180.72 0 00-9.13-19.84 4.38 4.38 0 00-6.33-1.47 34.27 34.27 0 00-9.32 9.65 4.31 4.31 0 002.41 6.46zM68.17 49.18a1.77 1.77 0 00-2.29-2.34 181.71 181.71 0 00-19.51 8.82A4.3 4.3 0 0044.91 62a34.36 34.36 0 009.42 8.88 4.36 4.36 0 006.5-2.38 175.11 175.11 0 017.34-19.32zM77.79 35.59a1.78 1.78 0 002.3 2.35 182.51 182.51 0 0019.6-8.88 4.3 4.3 0 001.5-6.25 34.4 34.4 0 00-9.41-9.14A4.36 4.36 0 0085.24 16a174.51 174.51 0 01-7.45 19.59zM64.69 40.6a167.72 167.72 0 00-20.22-7.44A4.36 4.36 0 0039 36.6a33.68 33.68 0 00-.45 5.54 34 34 0 00.81 7.4 4.36 4.36 0 006.28 2.84 189.19 189.19 0 0119-8.52 1.76 1.76 0 00.05-3.26zM20 129.315c0 5-2.72 8.16-7.11 8.16-2.37 0-4.17-1-6.2-3.56l-.69-.78-6 5 .57.76c3.25 4.36 7.16 6.39 12.31 6.39 9 0 15.34-6.57 15.34-16v-28.1H20zM61.69 126.505c0 6.66-3.76 11-9.57 11-5.81 0-9.56-4.31-9.56-11v-25.32h-8.23v25.69c0 10.66 7.4 18.4 17.6 18.4 10 0 17.61-7.72 18-18.4v-25.69h-8.24zM106.83 134.095c-3.58 2.43-6.18 3.38-9.25 3.38a14.53 14.53 0 010-29c3.24 0 5.66.88 9.25 3.38l.76.53 4.78-6-.75-.62a22.18 22.18 0 00-14.22-5.1 22.33 22.33 0 100 44.65 21.53 21.53 0 0014.39-5.08l.81-.64-5-6zM145.75 137.285h-19.06v-10.72h18.3v-7.61h-18.3v-10.16h19.06v-7.61h-27.28v43.53h27.28z"
 | 
			
		||||
        "M68.015 83.917c-7.723-.902-15.472-4.123-21.566-8.966-8.475-6.736-14.172-16.823-15.574-27.575C29.303 35.31 33.538 22.7 42.21 13.631 49.154 6.368 58.07 1.902 68.042.695c2.15-.26 7.524-.26 9.675 0 12.488 1.512 23.464 8.25 30.437 18.686 8.332 12.471 9.318 28.123 2.605 41.368-2.28 4.5-4.337 7.359-7.85 10.909A42.273 42.273 0 0177.613 83.92c-2.027.227-7.644.225-9.598-.003zm7.823-5.596c8.435-.415 17.446-4.678 23.683-11.205 5.976-6.254 9.35-13.723 10.181-22.537.632-6.705-1.346-14.948-5.065-21.108C98.88 13.935 89.397 7.602 78.34 5.906c-2.541-.39-8.398-.386-10.96.006C53.54 8.034 42.185 17.542 37.81 30.67c-2.807 8.426-2.421 17.267 1.11 25.444 4.877 11.297 14.959 19.41 26.977 21.709 2.136.408 6.1.755 7.377.645.325-.028 1.48-.094 2.564-.147z"
 | 
			
		||||
  );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
//==============================================================================
 | 
			
		||||
#if JUCE_MODULE_AVAILABLE_juce_gui_extra
 | 
			
		||||
 inline CodeEditorComponent::ColourScheme getDarkCodeEditorColourScheme()
 | 
			
		||||
 {
 | 
			
		||||
     struct Type
 | 
			
		||||
     {
 | 
			
		||||
         const char* name;
 | 
			
		||||
         juce::uint32 colour;
 | 
			
		||||
     };
 | 
			
		||||
 | 
			
		||||
     const Type types[] =
 | 
			
		||||
     {
 | 
			
		||||
         { "Error",              0xffe60000 },
 | 
			
		||||
         { "Comment",            0xff72d20c },
 | 
			
		||||
         { "Keyword",            0xffee6f6f },
 | 
			
		||||
         { "Operator",           0xffc4eb19 },
 | 
			
		||||
         { "Identifier",         0xffcfcfcf },
 | 
			
		||||
         { "Integer",            0xff42c8c4 },
 | 
			
		||||
         { "Float",              0xff885500 },
 | 
			
		||||
         { "String",             0xffbc45dd },
 | 
			
		||||
         { "Bracket",            0xff058202 },
 | 
			
		||||
         { "Punctuation",        0xffcfbeff },
 | 
			
		||||
         { "Preprocessor Text",  0xfff8f631 }
 | 
			
		||||
     };
 | 
			
		||||
 | 
			
		||||
     CodeEditorComponent::ColourScheme cs;
 | 
			
		||||
 | 
			
		||||
     for (auto& t : types)
 | 
			
		||||
         cs.set (t.name, Colour (t.colour));
 | 
			
		||||
 | 
			
		||||
     return cs;
 | 
			
		||||
 }
 | 
			
		||||
 | 
			
		||||
 inline CodeEditorComponent::ColourScheme getLightCodeEditorColourScheme()
 | 
			
		||||
 {
 | 
			
		||||
     struct Type
 | 
			
		||||
     {
 | 
			
		||||
         const char* name;
 | 
			
		||||
         juce::uint32 colour;
 | 
			
		||||
     };
 | 
			
		||||
 | 
			
		||||
     const Type types[] =
 | 
			
		||||
     {
 | 
			
		||||
         { "Error",              0xffcc0000 },
 | 
			
		||||
         { "Comment",            0xff00aa00 },
 | 
			
		||||
         { "Keyword",            0xff0000cc },
 | 
			
		||||
         { "Operator",           0xff225500 },
 | 
			
		||||
         { "Identifier",         0xff000000 },
 | 
			
		||||
         { "Integer",            0xff880000 },
 | 
			
		||||
         { "Float",              0xff885500 },
 | 
			
		||||
         { "String",             0xff990099 },
 | 
			
		||||
         { "Bracket",            0xff000055 },
 | 
			
		||||
         { "Punctuation",        0xff004400 },
 | 
			
		||||
         { "Preprocessor Text",  0xff660000 }
 | 
			
		||||
     };
 | 
			
		||||
 | 
			
		||||
     CodeEditorComponent::ColourScheme cs;
 | 
			
		||||
 | 
			
		||||
     for (auto& t : types)
 | 
			
		||||
         cs.set (t.name, Colour (t.colour));
 | 
			
		||||
 | 
			
		||||
     return cs;
 | 
			
		||||
 }
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
//==============================================================================
 | 
			
		||||
// This is basically a sawtooth wave generator - maps a value that bounces between
 | 
			
		||||
// 0.0 and 1.0 at a random speed
 | 
			
		||||
struct BouncingNumber
 | 
			
		||||
{
 | 
			
		||||
    BouncingNumber()
 | 
			
		||||
        : speed (0.0004 + 0.0007 * Random::getSystemRandom().nextDouble()),
 | 
			
		||||
          phase (Random::getSystemRandom().nextDouble())
 | 
			
		||||
    {
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    float getValue() const
 | 
			
		||||
    {
 | 
			
		||||
        double v = fmod (phase + speed * Time::getMillisecondCounterHiRes(), 2.0);
 | 
			
		||||
        return (float) (v >= 1.0 ? (2.0 - v) : v);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
protected:
 | 
			
		||||
    double speed, phase;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
struct SlowerBouncingNumber  : public BouncingNumber
 | 
			
		||||
{
 | 
			
		||||
    SlowerBouncingNumber()
 | 
			
		||||
    {
 | 
			
		||||
        speed *= 0.3;
 | 
			
		||||
    }
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif   // PIP_DEMO_UTILITIES_INCLUDED
 | 
			
		||||
 
 | 
			
		||||
@@ -1,365 +1,365 @@
 | 
			
		||||
/*
 | 
			
		||||
  ==============================================================================
 | 
			
		||||
 | 
			
		||||
   This file is part of the JUCE examples.
 | 
			
		||||
   Copyright (c) 2020 - Raw Material Software Limited
 | 
			
		||||
 | 
			
		||||
   The code included in this file is provided under the terms of the ISC license
 | 
			
		||||
   http://www.isc.org/downloads/software-support-policy/isc-license. Permission
 | 
			
		||||
   To use, copy, modify, and/or distribute this software for any purpose with or
 | 
			
		||||
   without fee is hereby granted provided that the above copyright notice and
 | 
			
		||||
   this permission notice appear in all copies.
 | 
			
		||||
 | 
			
		||||
   THE SOFTWARE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES,
 | 
			
		||||
   WHETHER EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR
 | 
			
		||||
   PURPOSE, ARE DISCLAIMED.
 | 
			
		||||
 | 
			
		||||
  ==============================================================================
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
#include <map>
 | 
			
		||||
 | 
			
		||||
//==============================================================================
 | 
			
		||||
/**
 | 
			
		||||
    This is a quick-and-dirty parser for the 3D OBJ file format.
 | 
			
		||||
 | 
			
		||||
    Just call load() and if there aren't any errors, the 'shapes' array should
 | 
			
		||||
    be filled with all the shape objects that were loaded from the file.
 | 
			
		||||
*/
 | 
			
		||||
class WavefrontObjFile
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
    WavefrontObjFile() {}
 | 
			
		||||
 | 
			
		||||
    Result load (const String& objFileContent)
 | 
			
		||||
    {
 | 
			
		||||
        shapes.clear();
 | 
			
		||||
        return parseObjFile (StringArray::fromLines (objFileContent));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    Result load (const File& file)
 | 
			
		||||
    {
 | 
			
		||||
        sourceFile = file;
 | 
			
		||||
        return load (file.loadFileAsString());
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    //==============================================================================
 | 
			
		||||
    typedef juce::uint32 Index;
 | 
			
		||||
 | 
			
		||||
    struct Vertex        { float x, y, z; };
 | 
			
		||||
    struct TextureCoord  { float x, y;    };
 | 
			
		||||
 | 
			
		||||
    struct Mesh
 | 
			
		||||
    {
 | 
			
		||||
        Array<Vertex> vertices, normals;
 | 
			
		||||
        Array<TextureCoord> textureCoords;
 | 
			
		||||
        Array<Index> indices;
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    struct Material
 | 
			
		||||
    {
 | 
			
		||||
        Material() noexcept
 | 
			
		||||
        {
 | 
			
		||||
            zerostruct (ambient);
 | 
			
		||||
            zerostruct (diffuse);
 | 
			
		||||
            zerostruct (specular);
 | 
			
		||||
            zerostruct (transmittance);
 | 
			
		||||
            zerostruct (emission);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        String name;
 | 
			
		||||
 | 
			
		||||
        Vertex ambient, diffuse, specular, transmittance, emission;
 | 
			
		||||
        float shininess = 1.0f, refractiveIndex = 0.0f;
 | 
			
		||||
 | 
			
		||||
        String ambientTextureName, diffuseTextureName,
 | 
			
		||||
               specularTextureName, normalTextureName;
 | 
			
		||||
 | 
			
		||||
        StringPairArray parameters;
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    struct Shape
 | 
			
		||||
    {
 | 
			
		||||
        String name;
 | 
			
		||||
        Mesh mesh;
 | 
			
		||||
        Material material;
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    OwnedArray<Shape> shapes;
 | 
			
		||||
 | 
			
		||||
private:
 | 
			
		||||
    //==============================================================================
 | 
			
		||||
    File sourceFile;
 | 
			
		||||
 | 
			
		||||
    struct TripleIndex
 | 
			
		||||
    {
 | 
			
		||||
        TripleIndex() noexcept {}
 | 
			
		||||
 | 
			
		||||
        bool operator< (const TripleIndex& other) const noexcept
 | 
			
		||||
        {
 | 
			
		||||
            if (this == &other)
 | 
			
		||||
                return false;
 | 
			
		||||
 | 
			
		||||
            if (vertexIndex != other.vertexIndex)
 | 
			
		||||
                return vertexIndex < other.vertexIndex;
 | 
			
		||||
 | 
			
		||||
            if (textureIndex != other.textureIndex)
 | 
			
		||||
                return textureIndex < other.textureIndex;
 | 
			
		||||
 | 
			
		||||
            return normalIndex < other.normalIndex;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        int vertexIndex = -1, textureIndex = -1, normalIndex = -1;
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    struct IndexMap
 | 
			
		||||
    {
 | 
			
		||||
        std::map<TripleIndex, Index> map;
 | 
			
		||||
 | 
			
		||||
        Index getIndexFor (TripleIndex i, Mesh& newMesh, const Mesh& srcMesh)
 | 
			
		||||
        {
 | 
			
		||||
            const std::map<TripleIndex, Index>::iterator it (map.find (i));
 | 
			
		||||
 | 
			
		||||
            if (it != map.end())
 | 
			
		||||
                return it->second;
 | 
			
		||||
 | 
			
		||||
            auto index = (Index) newMesh.vertices.size();
 | 
			
		||||
 | 
			
		||||
            if (isPositiveAndBelow (i.vertexIndex, srcMesh.vertices.size()))
 | 
			
		||||
                newMesh.vertices.add (srcMesh.vertices.getReference (i.vertexIndex));
 | 
			
		||||
 | 
			
		||||
            if (isPositiveAndBelow (i.normalIndex, srcMesh.normals.size()))
 | 
			
		||||
                newMesh.normals.add (srcMesh.normals.getReference (i.normalIndex));
 | 
			
		||||
 | 
			
		||||
            if (isPositiveAndBelow (i.textureIndex, srcMesh.textureCoords.size()))
 | 
			
		||||
                newMesh.textureCoords.add (srcMesh.textureCoords.getReference (i.textureIndex));
 | 
			
		||||
 | 
			
		||||
            map[i] = index;
 | 
			
		||||
            return index;
 | 
			
		||||
        }
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    static float parseFloat (String::CharPointerType& t)
 | 
			
		||||
    {
 | 
			
		||||
        t.incrementToEndOfWhitespace();
 | 
			
		||||
        return (float) CharacterFunctions::readDoubleValue (t);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Vertex parseVertex (String::CharPointerType t)
 | 
			
		||||
    {
 | 
			
		||||
        Vertex v;
 | 
			
		||||
        v.x = parseFloat (t);
 | 
			
		||||
        v.y = parseFloat (t);
 | 
			
		||||
        v.z = parseFloat (t);
 | 
			
		||||
        return v;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static TextureCoord parseTextureCoord (String::CharPointerType t)
 | 
			
		||||
    {
 | 
			
		||||
        TextureCoord tc;
 | 
			
		||||
        tc.x = parseFloat (t);
 | 
			
		||||
        tc.y = parseFloat (t);
 | 
			
		||||
        return tc;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static bool matchToken (String::CharPointerType& t, const char* token)
 | 
			
		||||
    {
 | 
			
		||||
        auto len = (int) strlen (token);
 | 
			
		||||
 | 
			
		||||
        if (CharacterFunctions::compareUpTo (CharPointer_ASCII (token), t, len) == 0)
 | 
			
		||||
        {
 | 
			
		||||
            auto end = t + len;
 | 
			
		||||
 | 
			
		||||
            if (end.isEmpty() || end.isWhitespace())
 | 
			
		||||
            {
 | 
			
		||||
                t = end.findEndOfWhitespace();
 | 
			
		||||
                return true;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        return false;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    struct Face
 | 
			
		||||
    {
 | 
			
		||||
        Face (String::CharPointerType t)
 | 
			
		||||
        {
 | 
			
		||||
            while (! t.isEmpty())
 | 
			
		||||
                triples.add (parseTriple (t));
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        Array<TripleIndex> triples;
 | 
			
		||||
 | 
			
		||||
        void addIndices (Mesh& newMesh, const Mesh& srcMesh, IndexMap& indexMap)
 | 
			
		||||
        {
 | 
			
		||||
            TripleIndex i0 (triples[0]), i1, i2 (triples[1]);
 | 
			
		||||
 | 
			
		||||
            for (auto i = 2; i < triples.size(); ++i)
 | 
			
		||||
            {
 | 
			
		||||
                i1 = i2;
 | 
			
		||||
                i2 = triples.getReference (i);
 | 
			
		||||
 | 
			
		||||
                newMesh.indices.add (indexMap.getIndexFor (i0, newMesh, srcMesh));
 | 
			
		||||
                newMesh.indices.add (indexMap.getIndexFor (i1, newMesh, srcMesh));
 | 
			
		||||
                newMesh.indices.add (indexMap.getIndexFor (i2, newMesh, srcMesh));
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        static TripleIndex parseTriple (String::CharPointerType& t)
 | 
			
		||||
        {
 | 
			
		||||
            TripleIndex i;
 | 
			
		||||
 | 
			
		||||
            t.incrementToEndOfWhitespace();
 | 
			
		||||
            i.vertexIndex = t.getIntValue32() - 1;
 | 
			
		||||
            t = findEndOfFaceToken (t);
 | 
			
		||||
 | 
			
		||||
            if (t.isEmpty() || t.getAndAdvance() != '/')
 | 
			
		||||
                return i;
 | 
			
		||||
 | 
			
		||||
            if (*t == '/')
 | 
			
		||||
            {
 | 
			
		||||
                ++t;
 | 
			
		||||
            }
 | 
			
		||||
            else
 | 
			
		||||
            {
 | 
			
		||||
                i.textureIndex = t.getIntValue32() - 1;
 | 
			
		||||
                t = findEndOfFaceToken (t);
 | 
			
		||||
 | 
			
		||||
                if (t.isEmpty() || t.getAndAdvance() != '/')
 | 
			
		||||
                    return i;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            i.normalIndex = t.getIntValue32() - 1;
 | 
			
		||||
            t = findEndOfFaceToken (t);
 | 
			
		||||
            return i;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        static String::CharPointerType findEndOfFaceToken (String::CharPointerType t) noexcept
 | 
			
		||||
        {
 | 
			
		||||
            return CharacterFunctions::findEndOfToken (t, CharPointer_ASCII ("/ \t"), String().getCharPointer());
 | 
			
		||||
        }
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    static Shape* parseFaceGroup (const Mesh& srcMesh,
 | 
			
		||||
                                  Array<Face>& faceGroup,
 | 
			
		||||
                                  const Material& material,
 | 
			
		||||
                                  const String& name)
 | 
			
		||||
    {
 | 
			
		||||
        if (faceGroup.size() == 0)
 | 
			
		||||
            return nullptr;
 | 
			
		||||
 | 
			
		||||
        std::unique_ptr<Shape> shape (new Shape());
 | 
			
		||||
        shape->name = name;
 | 
			
		||||
        shape->material = material;
 | 
			
		||||
 | 
			
		||||
        IndexMap indexMap;
 | 
			
		||||
 | 
			
		||||
        for (auto& f : faceGroup)
 | 
			
		||||
            f.addIndices (shape->mesh, srcMesh, indexMap);
 | 
			
		||||
 | 
			
		||||
        return shape.release();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    Result parseObjFile (const StringArray& lines)
 | 
			
		||||
    {
 | 
			
		||||
        Mesh mesh;
 | 
			
		||||
        Array<Face> faceGroup;
 | 
			
		||||
 | 
			
		||||
        Array<Material> knownMaterials;
 | 
			
		||||
        Material lastMaterial;
 | 
			
		||||
        String lastName;
 | 
			
		||||
 | 
			
		||||
        for (auto lineNum = 0; lineNum < lines.size(); ++lineNum)
 | 
			
		||||
        {
 | 
			
		||||
            auto l = lines[lineNum].getCharPointer().findEndOfWhitespace();
 | 
			
		||||
 | 
			
		||||
            if (matchToken (l, "v"))    { mesh.vertices     .add (parseVertex (l));       continue; }
 | 
			
		||||
            if (matchToken (l, "vn"))   { mesh.normals      .add (parseVertex (l));       continue; }
 | 
			
		||||
            if (matchToken (l, "vt"))   { mesh.textureCoords.add (parseTextureCoord (l)); continue; }
 | 
			
		||||
            if (matchToken (l, "f"))    { faceGroup         .add (Face (l));              continue; }
 | 
			
		||||
 | 
			
		||||
            if (matchToken (l, "usemtl"))
 | 
			
		||||
            {
 | 
			
		||||
                auto name = String (l).trim();
 | 
			
		||||
 | 
			
		||||
                for (auto i = knownMaterials.size(); --i >= 0;)
 | 
			
		||||
                {
 | 
			
		||||
                    if (knownMaterials.getReference (i).name == name)
 | 
			
		||||
                    {
 | 
			
		||||
                        lastMaterial = knownMaterials.getReference (i);
 | 
			
		||||
                        break;
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                continue;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            if (matchToken (l, "mtllib"))
 | 
			
		||||
            {
 | 
			
		||||
                auto r = parseMaterial (knownMaterials, String (l).trim());
 | 
			
		||||
                continue;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            if (matchToken (l, "g") || matchToken (l, "o"))
 | 
			
		||||
            {
 | 
			
		||||
                if (auto* shape = parseFaceGroup (mesh, faceGroup, lastMaterial, lastName))
 | 
			
		||||
                    shapes.add (shape);
 | 
			
		||||
 | 
			
		||||
                faceGroup.clear();
 | 
			
		||||
                lastName = StringArray::fromTokens (l, " \t", "")[0];
 | 
			
		||||
                continue;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (auto* shape = parseFaceGroup (mesh, faceGroup, lastMaterial, lastName))
 | 
			
		||||
            shapes.add (shape);
 | 
			
		||||
 | 
			
		||||
        return Result::ok();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    Result parseMaterial (Array<Material>& materials, const String& filename)
 | 
			
		||||
    {
 | 
			
		||||
        jassert (sourceFile.exists());
 | 
			
		||||
        auto f = sourceFile.getSiblingFile (filename);
 | 
			
		||||
 | 
			
		||||
        if (! f.exists())
 | 
			
		||||
            return Result::fail ("Cannot open file: " + filename);
 | 
			
		||||
 | 
			
		||||
        auto lines = StringArray::fromLines (f.loadFileAsString());
 | 
			
		||||
 | 
			
		||||
        materials.clear();
 | 
			
		||||
        Material material;
 | 
			
		||||
 | 
			
		||||
        for (auto line : lines)
 | 
			
		||||
        {
 | 
			
		||||
            auto l = line.getCharPointer().findEndOfWhitespace();
 | 
			
		||||
 | 
			
		||||
            if (matchToken (l, "newmtl"))   { materials.add (material); material.name = String (l).trim(); continue; }
 | 
			
		||||
 | 
			
		||||
            if (matchToken (l, "Ka"))       { material.ambient         = parseVertex (l); continue; }
 | 
			
		||||
            if (matchToken (l, "Kd"))       { material.diffuse         = parseVertex (l); continue; }
 | 
			
		||||
            if (matchToken (l, "Ks"))       { material.specular        = parseVertex (l); continue; }
 | 
			
		||||
            if (matchToken (l, "Kt"))       { material.transmittance   = parseVertex (l); continue; }
 | 
			
		||||
            if (matchToken (l, "Ke"))       { material.emission        = parseVertex (l); continue; }
 | 
			
		||||
            if (matchToken (l, "Ni"))       { material.refractiveIndex = parseFloat (l);  continue; }
 | 
			
		||||
            if (matchToken (l, "Ns"))       { material.shininess       = parseFloat (l);  continue; }
 | 
			
		||||
 | 
			
		||||
            if (matchToken (l, "map_Ka"))   { material.ambientTextureName  = String (l).trim(); continue; }
 | 
			
		||||
            if (matchToken (l, "map_Kd"))   { material.diffuseTextureName  = String (l).trim(); continue; }
 | 
			
		||||
            if (matchToken (l, "map_Ks"))   { material.specularTextureName = String (l).trim(); continue; }
 | 
			
		||||
            if (matchToken (l, "map_Ns"))   { material.normalTextureName   = String (l).trim(); continue; }
 | 
			
		||||
 | 
			
		||||
            auto tokens = StringArray::fromTokens (l, " \t", "");
 | 
			
		||||
 | 
			
		||||
            if (tokens.size() >= 2)
 | 
			
		||||
                material.parameters.set (tokens[0].trim(), tokens[1].trim());
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        materials.add (material);
 | 
			
		||||
        return Result::ok();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WavefrontObjFile)
 | 
			
		||||
};
 | 
			
		||||
/*
 | 
			
		||||
  ==============================================================================
 | 
			
		||||
 | 
			
		||||
   This file is part of the JUCE examples.
 | 
			
		||||
   Copyright (c) 2022 - Raw Material Software Limited
 | 
			
		||||
 | 
			
		||||
   The code included in this file is provided under the terms of the ISC license
 | 
			
		||||
   http://www.isc.org/downloads/software-support-policy/isc-license. Permission
 | 
			
		||||
   To use, copy, modify, and/or distribute this software for any purpose with or
 | 
			
		||||
   without fee is hereby granted provided that the above copyright notice and
 | 
			
		||||
   this permission notice appear in all copies.
 | 
			
		||||
 | 
			
		||||
   THE SOFTWARE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES,
 | 
			
		||||
   WHETHER EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR
 | 
			
		||||
   PURPOSE, ARE DISCLAIMED.
 | 
			
		||||
 | 
			
		||||
  ==============================================================================
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
#include <map>
 | 
			
		||||
 | 
			
		||||
//==============================================================================
 | 
			
		||||
/**
 | 
			
		||||
    This is a quick-and-dirty parser for the 3D OBJ file format.
 | 
			
		||||
 | 
			
		||||
    Just call load() and if there aren't any errors, the 'shapes' array should
 | 
			
		||||
    be filled with all the shape objects that were loaded from the file.
 | 
			
		||||
*/
 | 
			
		||||
class WavefrontObjFile
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
    WavefrontObjFile() {}
 | 
			
		||||
 | 
			
		||||
    Result load (const String& objFileContent)
 | 
			
		||||
    {
 | 
			
		||||
        shapes.clear();
 | 
			
		||||
        return parseObjFile (StringArray::fromLines (objFileContent));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    Result load (const File& file)
 | 
			
		||||
    {
 | 
			
		||||
        sourceFile = file;
 | 
			
		||||
        return load (file.loadFileAsString());
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    //==============================================================================
 | 
			
		||||
    typedef juce::uint32 Index;
 | 
			
		||||
 | 
			
		||||
    struct Vertex        { float x, y, z; };
 | 
			
		||||
    struct TextureCoord  { float x, y;    };
 | 
			
		||||
 | 
			
		||||
    struct Mesh
 | 
			
		||||
    {
 | 
			
		||||
        Array<Vertex> vertices, normals;
 | 
			
		||||
        Array<TextureCoord> textureCoords;
 | 
			
		||||
        Array<Index> indices;
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    struct Material
 | 
			
		||||
    {
 | 
			
		||||
        Material() noexcept
 | 
			
		||||
        {
 | 
			
		||||
            zerostruct (ambient);
 | 
			
		||||
            zerostruct (diffuse);
 | 
			
		||||
            zerostruct (specular);
 | 
			
		||||
            zerostruct (transmittance);
 | 
			
		||||
            zerostruct (emission);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        String name;
 | 
			
		||||
 | 
			
		||||
        Vertex ambient, diffuse, specular, transmittance, emission;
 | 
			
		||||
        float shininess = 1.0f, refractiveIndex = 0.0f;
 | 
			
		||||
 | 
			
		||||
        String ambientTextureName, diffuseTextureName,
 | 
			
		||||
               specularTextureName, normalTextureName;
 | 
			
		||||
 | 
			
		||||
        StringPairArray parameters;
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    struct Shape
 | 
			
		||||
    {
 | 
			
		||||
        String name;
 | 
			
		||||
        Mesh mesh;
 | 
			
		||||
        Material material;
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    OwnedArray<Shape> shapes;
 | 
			
		||||
 | 
			
		||||
private:
 | 
			
		||||
    //==============================================================================
 | 
			
		||||
    File sourceFile;
 | 
			
		||||
 | 
			
		||||
    struct TripleIndex
 | 
			
		||||
    {
 | 
			
		||||
        TripleIndex() noexcept {}
 | 
			
		||||
 | 
			
		||||
        bool operator< (const TripleIndex& other) const noexcept
 | 
			
		||||
        {
 | 
			
		||||
            if (this == &other)
 | 
			
		||||
                return false;
 | 
			
		||||
 | 
			
		||||
            if (vertexIndex != other.vertexIndex)
 | 
			
		||||
                return vertexIndex < other.vertexIndex;
 | 
			
		||||
 | 
			
		||||
            if (textureIndex != other.textureIndex)
 | 
			
		||||
                return textureIndex < other.textureIndex;
 | 
			
		||||
 | 
			
		||||
            return normalIndex < other.normalIndex;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        int vertexIndex = -1, textureIndex = -1, normalIndex = -1;
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    struct IndexMap
 | 
			
		||||
    {
 | 
			
		||||
        std::map<TripleIndex, Index> map;
 | 
			
		||||
 | 
			
		||||
        Index getIndexFor (TripleIndex i, Mesh& newMesh, const Mesh& srcMesh)
 | 
			
		||||
        {
 | 
			
		||||
            const std::map<TripleIndex, Index>::iterator it (map.find (i));
 | 
			
		||||
 | 
			
		||||
            if (it != map.end())
 | 
			
		||||
                return it->second;
 | 
			
		||||
 | 
			
		||||
            auto index = (Index) newMesh.vertices.size();
 | 
			
		||||
 | 
			
		||||
            if (isPositiveAndBelow (i.vertexIndex, srcMesh.vertices.size()))
 | 
			
		||||
                newMesh.vertices.add (srcMesh.vertices.getReference (i.vertexIndex));
 | 
			
		||||
 | 
			
		||||
            if (isPositiveAndBelow (i.normalIndex, srcMesh.normals.size()))
 | 
			
		||||
                newMesh.normals.add (srcMesh.normals.getReference (i.normalIndex));
 | 
			
		||||
 | 
			
		||||
            if (isPositiveAndBelow (i.textureIndex, srcMesh.textureCoords.size()))
 | 
			
		||||
                newMesh.textureCoords.add (srcMesh.textureCoords.getReference (i.textureIndex));
 | 
			
		||||
 | 
			
		||||
            map[i] = index;
 | 
			
		||||
            return index;
 | 
			
		||||
        }
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    static float parseFloat (String::CharPointerType& t)
 | 
			
		||||
    {
 | 
			
		||||
        t.incrementToEndOfWhitespace();
 | 
			
		||||
        return (float) CharacterFunctions::readDoubleValue (t);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static Vertex parseVertex (String::CharPointerType t)
 | 
			
		||||
    {
 | 
			
		||||
        Vertex v;
 | 
			
		||||
        v.x = parseFloat (t);
 | 
			
		||||
        v.y = parseFloat (t);
 | 
			
		||||
        v.z = parseFloat (t);
 | 
			
		||||
        return v;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static TextureCoord parseTextureCoord (String::CharPointerType t)
 | 
			
		||||
    {
 | 
			
		||||
        TextureCoord tc;
 | 
			
		||||
        tc.x = parseFloat (t);
 | 
			
		||||
        tc.y = parseFloat (t);
 | 
			
		||||
        return tc;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static bool matchToken (String::CharPointerType& t, const char* token)
 | 
			
		||||
    {
 | 
			
		||||
        auto len = (int) strlen (token);
 | 
			
		||||
 | 
			
		||||
        if (CharacterFunctions::compareUpTo (CharPointer_ASCII (token), t, len) == 0)
 | 
			
		||||
        {
 | 
			
		||||
            auto end = t + len;
 | 
			
		||||
 | 
			
		||||
            if (end.isEmpty() || end.isWhitespace())
 | 
			
		||||
            {
 | 
			
		||||
                t = end.findEndOfWhitespace();
 | 
			
		||||
                return true;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        return false;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    struct Face
 | 
			
		||||
    {
 | 
			
		||||
        Face (String::CharPointerType t)
 | 
			
		||||
        {
 | 
			
		||||
            while (! t.isEmpty())
 | 
			
		||||
                triples.add (parseTriple (t));
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        Array<TripleIndex> triples;
 | 
			
		||||
 | 
			
		||||
        void addIndices (Mesh& newMesh, const Mesh& srcMesh, IndexMap& indexMap)
 | 
			
		||||
        {
 | 
			
		||||
            TripleIndex i0 (triples[0]), i1, i2 (triples[1]);
 | 
			
		||||
 | 
			
		||||
            for (auto i = 2; i < triples.size(); ++i)
 | 
			
		||||
            {
 | 
			
		||||
                i1 = i2;
 | 
			
		||||
                i2 = triples.getReference (i);
 | 
			
		||||
 | 
			
		||||
                newMesh.indices.add (indexMap.getIndexFor (i0, newMesh, srcMesh));
 | 
			
		||||
                newMesh.indices.add (indexMap.getIndexFor (i1, newMesh, srcMesh));
 | 
			
		||||
                newMesh.indices.add (indexMap.getIndexFor (i2, newMesh, srcMesh));
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        static TripleIndex parseTriple (String::CharPointerType& t)
 | 
			
		||||
        {
 | 
			
		||||
            TripleIndex i;
 | 
			
		||||
 | 
			
		||||
            t.incrementToEndOfWhitespace();
 | 
			
		||||
            i.vertexIndex = t.getIntValue32() - 1;
 | 
			
		||||
            t = findEndOfFaceToken (t);
 | 
			
		||||
 | 
			
		||||
            if (t.isEmpty() || t.getAndAdvance() != '/')
 | 
			
		||||
                return i;
 | 
			
		||||
 | 
			
		||||
            if (*t == '/')
 | 
			
		||||
            {
 | 
			
		||||
                ++t;
 | 
			
		||||
            }
 | 
			
		||||
            else
 | 
			
		||||
            {
 | 
			
		||||
                i.textureIndex = t.getIntValue32() - 1;
 | 
			
		||||
                t = findEndOfFaceToken (t);
 | 
			
		||||
 | 
			
		||||
                if (t.isEmpty() || t.getAndAdvance() != '/')
 | 
			
		||||
                    return i;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            i.normalIndex = t.getIntValue32() - 1;
 | 
			
		||||
            t = findEndOfFaceToken (t);
 | 
			
		||||
            return i;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        static String::CharPointerType findEndOfFaceToken (String::CharPointerType t) noexcept
 | 
			
		||||
        {
 | 
			
		||||
            return CharacterFunctions::findEndOfToken (t, CharPointer_ASCII ("/ \t"), String().getCharPointer());
 | 
			
		||||
        }
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    static Shape* parseFaceGroup (const Mesh& srcMesh,
 | 
			
		||||
                                  Array<Face>& faceGroup,
 | 
			
		||||
                                  const Material& material,
 | 
			
		||||
                                  const String& name)
 | 
			
		||||
    {
 | 
			
		||||
        if (faceGroup.size() == 0)
 | 
			
		||||
            return nullptr;
 | 
			
		||||
 | 
			
		||||
        std::unique_ptr<Shape> shape (new Shape());
 | 
			
		||||
        shape->name = name;
 | 
			
		||||
        shape->material = material;
 | 
			
		||||
 | 
			
		||||
        IndexMap indexMap;
 | 
			
		||||
 | 
			
		||||
        for (auto& f : faceGroup)
 | 
			
		||||
            f.addIndices (shape->mesh, srcMesh, indexMap);
 | 
			
		||||
 | 
			
		||||
        return shape.release();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    Result parseObjFile (const StringArray& lines)
 | 
			
		||||
    {
 | 
			
		||||
        Mesh mesh;
 | 
			
		||||
        Array<Face> faceGroup;
 | 
			
		||||
 | 
			
		||||
        Array<Material> knownMaterials;
 | 
			
		||||
        Material lastMaterial;
 | 
			
		||||
        String lastName;
 | 
			
		||||
 | 
			
		||||
        for (auto lineNum = 0; lineNum < lines.size(); ++lineNum)
 | 
			
		||||
        {
 | 
			
		||||
            auto l = lines[lineNum].getCharPointer().findEndOfWhitespace();
 | 
			
		||||
 | 
			
		||||
            if (matchToken (l, "v"))    { mesh.vertices     .add (parseVertex (l));       continue; }
 | 
			
		||||
            if (matchToken (l, "vn"))   { mesh.normals      .add (parseVertex (l));       continue; }
 | 
			
		||||
            if (matchToken (l, "vt"))   { mesh.textureCoords.add (parseTextureCoord (l)); continue; }
 | 
			
		||||
            if (matchToken (l, "f"))    { faceGroup         .add (Face (l));              continue; }
 | 
			
		||||
 | 
			
		||||
            if (matchToken (l, "usemtl"))
 | 
			
		||||
            {
 | 
			
		||||
                auto name = String (l).trim();
 | 
			
		||||
 | 
			
		||||
                for (auto i = knownMaterials.size(); --i >= 0;)
 | 
			
		||||
                {
 | 
			
		||||
                    if (knownMaterials.getReference (i).name == name)
 | 
			
		||||
                    {
 | 
			
		||||
                        lastMaterial = knownMaterials.getReference (i);
 | 
			
		||||
                        break;
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                continue;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            if (matchToken (l, "mtllib"))
 | 
			
		||||
            {
 | 
			
		||||
                auto r = parseMaterial (knownMaterials, String (l).trim());
 | 
			
		||||
                continue;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            if (matchToken (l, "g") || matchToken (l, "o"))
 | 
			
		||||
            {
 | 
			
		||||
                if (auto* shape = parseFaceGroup (mesh, faceGroup, lastMaterial, lastName))
 | 
			
		||||
                    shapes.add (shape);
 | 
			
		||||
 | 
			
		||||
                faceGroup.clear();
 | 
			
		||||
                lastName = StringArray::fromTokens (l, " \t", "")[0];
 | 
			
		||||
                continue;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (auto* shape = parseFaceGroup (mesh, faceGroup, lastMaterial, lastName))
 | 
			
		||||
            shapes.add (shape);
 | 
			
		||||
 | 
			
		||||
        return Result::ok();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    Result parseMaterial (Array<Material>& materials, const String& filename)
 | 
			
		||||
    {
 | 
			
		||||
        jassert (sourceFile.exists());
 | 
			
		||||
        auto f = sourceFile.getSiblingFile (filename);
 | 
			
		||||
 | 
			
		||||
        if (! f.exists())
 | 
			
		||||
            return Result::fail ("Cannot open file: " + filename);
 | 
			
		||||
 | 
			
		||||
        auto lines = StringArray::fromLines (f.loadFileAsString());
 | 
			
		||||
 | 
			
		||||
        materials.clear();
 | 
			
		||||
        Material material;
 | 
			
		||||
 | 
			
		||||
        for (auto line : lines)
 | 
			
		||||
        {
 | 
			
		||||
            auto l = line.getCharPointer().findEndOfWhitespace();
 | 
			
		||||
 | 
			
		||||
            if (matchToken (l, "newmtl"))   { materials.add (material); material.name = String (l).trim(); continue; }
 | 
			
		||||
 | 
			
		||||
            if (matchToken (l, "Ka"))       { material.ambient         = parseVertex (l); continue; }
 | 
			
		||||
            if (matchToken (l, "Kd"))       { material.diffuse         = parseVertex (l); continue; }
 | 
			
		||||
            if (matchToken (l, "Ks"))       { material.specular        = parseVertex (l); continue; }
 | 
			
		||||
            if (matchToken (l, "Kt"))       { material.transmittance   = parseVertex (l); continue; }
 | 
			
		||||
            if (matchToken (l, "Ke"))       { material.emission        = parseVertex (l); continue; }
 | 
			
		||||
            if (matchToken (l, "Ni"))       { material.refractiveIndex = parseFloat (l);  continue; }
 | 
			
		||||
            if (matchToken (l, "Ns"))       { material.shininess       = parseFloat (l);  continue; }
 | 
			
		||||
 | 
			
		||||
            if (matchToken (l, "map_Ka"))   { material.ambientTextureName  = String (l).trim(); continue; }
 | 
			
		||||
            if (matchToken (l, "map_Kd"))   { material.diffuseTextureName  = String (l).trim(); continue; }
 | 
			
		||||
            if (matchToken (l, "map_Ks"))   { material.specularTextureName = String (l).trim(); continue; }
 | 
			
		||||
            if (matchToken (l, "map_Ns"))   { material.normalTextureName   = String (l).trim(); continue; }
 | 
			
		||||
 | 
			
		||||
            auto tokens = StringArray::fromTokens (l, " \t", "");
 | 
			
		||||
 | 
			
		||||
            if (tokens.size() >= 2)
 | 
			
		||||
                material.parameters.set (tokens[0].trim(), tokens[1].trim());
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        materials.add (material);
 | 
			
		||||
        return Result::ok();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WavefrontObjFile)
 | 
			
		||||
};
 | 
			
		||||
 
 | 
			
		||||
@@ -11,6 +11,10 @@ endif
 | 
			
		||||
# (this disables dependency generation if multiple architectures are set)
 | 
			
		||||
DEPFLAGS := $(if $(word 2, $(TARGET_ARCH)), , -MMD)
 | 
			
		||||
 | 
			
		||||
ifndef PKG_CONFIG
 | 
			
		||||
  PKG_CONFIG=pkg-config
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
ifndef STRIP
 | 
			
		||||
  STRIP=strip
 | 
			
		||||
endif
 | 
			
		||||
@@ -35,13 +39,13 @@ ifeq ($(CONFIG),Debug)
 | 
			
		||||
    TARGET_ARCH := 
 | 
			
		||||
  endif
 | 
			
		||||
 | 
			
		||||
  JUCE_CPPFLAGS := $(DEPFLAGS) "-DLINUX=1" "-DDEBUG=1" "-D_DEBUG=1" "-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x60102" "-DJUCE_MODULE_AVAILABLE_juce_analytics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1" "-DJUCE_MODULE_AVAILABLE_juce_box2d=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_cryptography=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_dsp=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_MODULE_AVAILABLE_juce_opengl=1" "-DJUCE_MODULE_AVAILABLE_juce_osc=1" "-DJUCE_MODULE_AVAILABLE_juce_product_unlocking=1" "-DJUCE_MODULE_AVAILABLE_juce_video=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_USE_MP3AUDIOFORMAT=1" "-DJUCE_ALLOW_STATIC_NULL_VARIABLES=0" "-DJUCE_STRICT_REFCOUNTEDPOINTER=1" "-DJUCE_USE_CAMERA=1" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCE_DEMO_RUNNER=1" "-DJUCE_UNIT_TESTS=1" "-DJUCER_LINUX_MAKE_6D53C8B4=1" "-DJUCE_APP_VERSION=6.1.2" "-DJUCE_APP_VERSION_HEX=0x60102" $(shell pkg-config --cflags alsa freetype2 libcurl webkit2gtk-4.0 gtk+-x11-3.0) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS)
 | 
			
		||||
  JUCE_CPPFLAGS_APP :=  "-DJucePlugin_Build_VST=0" "-DJucePlugin_Build_VST3=0" "-DJucePlugin_Build_AU=0" "-DJucePlugin_Build_AUv3=0" "-DJucePlugin_Build_RTAS=0" "-DJucePlugin_Build_AAX=0" "-DJucePlugin_Build_Standalone=0" "-DJucePlugin_Build_Unity=0"
 | 
			
		||||
  JUCE_CPPFLAGS := $(DEPFLAGS) "-DLINUX=1" "-DDEBUG=1" "-D_DEBUG=1" "-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x70002" "-DJUCE_MODULE_AVAILABLE_juce_analytics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1" "-DJUCE_MODULE_AVAILABLE_juce_box2d=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_cryptography=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_dsp=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_MODULE_AVAILABLE_juce_opengl=1" "-DJUCE_MODULE_AVAILABLE_juce_osc=1" "-DJUCE_MODULE_AVAILABLE_juce_product_unlocking=1" "-DJUCE_MODULE_AVAILABLE_juce_video=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_USE_MP3AUDIOFORMAT=1" "-DJUCE_PLUGINHOST_VST3=1" "-DJUCE_PLUGINHOST_LV2=1" "-DJUCE_ALLOW_STATIC_NULL_VARIABLES=0" "-DJUCE_STRICT_REFCOUNTEDPOINTER=1" "-DJUCE_USE_CAMERA=1" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCE_DEMO_RUNNER=1" "-DJUCE_UNIT_TESTS=1" "-DJUCER_LINUX_MAKE_6D53C8B4=1" "-DJUCE_APP_VERSION=7.0.2" "-DJUCE_APP_VERSION_HEX=0x70002" $(shell $(PKG_CONFIG) --cflags alsa freetype2 libcurl webkit2gtk-4.0 gtk+-x11-3.0) -pthread -I../../../../modules/juce_audio_processors/format_types/LV2_SDK/lilv/src -I../../../../modules/juce_audio_processors/format_types/LV2_SDK/lilv -I../../../../modules/juce_audio_processors/format_types/LV2_SDK/sratom -I../../../../modules/juce_audio_processors/format_types/LV2_SDK/sord/src -I../../../../modules/juce_audio_processors/format_types/LV2_SDK/sord -I../../../../modules/juce_audio_processors/format_types/LV2_SDK/serd -I../../../../modules/juce_audio_processors/format_types/LV2_SDK/lv2 -I../../../../modules/juce_audio_processors/format_types/LV2_SDK -I../../../../modules/juce_audio_processors/format_types/VST3_SDK -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS)
 | 
			
		||||
  JUCE_CPPFLAGS_APP :=  "-DJucePlugin_Build_VST=0" "-DJucePlugin_Build_VST3=0" "-DJucePlugin_Build_AU=0" "-DJucePlugin_Build_AUv3=0" "-DJucePlugin_Build_AAX=0" "-DJucePlugin_Build_Standalone=0" "-DJucePlugin_Build_Unity=0" "-DJucePlugin_Build_LV2=0"
 | 
			
		||||
  JUCE_TARGET_APP := DemoRunner
 | 
			
		||||
 | 
			
		||||
  JUCE_CFLAGS += $(JUCE_CPPFLAGS) $(TARGET_ARCH) -g -ggdb -O0 $(CFLAGS)
 | 
			
		||||
  JUCE_CXXFLAGS += $(JUCE_CFLAGS) -std=c++14 $(CXXFLAGS)
 | 
			
		||||
  JUCE_LDFLAGS += $(TARGET_ARCH) -L$(JUCE_BINDIR) -L$(JUCE_LIBDIR) $(shell pkg-config --libs alsa freetype2 libcurl) -fvisibility=hidden -lrt -ldl -lpthread -lGL $(LDFLAGS)
 | 
			
		||||
  JUCE_LDFLAGS += $(TARGET_ARCH) -L$(JUCE_BINDIR) -L$(JUCE_LIBDIR) $(shell $(PKG_CONFIG) --libs alsa freetype2 libcurl) -fvisibility=hidden -lrt -ldl -lpthread -lGL $(LDFLAGS)
 | 
			
		||||
 | 
			
		||||
  CLEANCMD = rm -rf $(JUCE_OUTDIR)/$(TARGET) $(JUCE_OBJDIR)
 | 
			
		||||
endif
 | 
			
		||||
@@ -56,13 +60,13 @@ ifeq ($(CONFIG),Release)
 | 
			
		||||
    TARGET_ARCH := 
 | 
			
		||||
  endif
 | 
			
		||||
 | 
			
		||||
  JUCE_CPPFLAGS := $(DEPFLAGS) "-DLINUX=1" "-DNDEBUG=1" "-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x60102" "-DJUCE_MODULE_AVAILABLE_juce_analytics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1" "-DJUCE_MODULE_AVAILABLE_juce_box2d=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_cryptography=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_dsp=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_MODULE_AVAILABLE_juce_opengl=1" "-DJUCE_MODULE_AVAILABLE_juce_osc=1" "-DJUCE_MODULE_AVAILABLE_juce_product_unlocking=1" "-DJUCE_MODULE_AVAILABLE_juce_video=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_USE_MP3AUDIOFORMAT=1" "-DJUCE_ALLOW_STATIC_NULL_VARIABLES=0" "-DJUCE_STRICT_REFCOUNTEDPOINTER=1" "-DJUCE_USE_CAMERA=1" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCE_DEMO_RUNNER=1" "-DJUCE_UNIT_TESTS=1" "-DJUCER_LINUX_MAKE_6D53C8B4=1" "-DJUCE_APP_VERSION=6.1.2" "-DJUCE_APP_VERSION_HEX=0x60102" $(shell pkg-config --cflags alsa freetype2 libcurl webkit2gtk-4.0 gtk+-x11-3.0) -pthread -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS)
 | 
			
		||||
  JUCE_CPPFLAGS_APP :=  "-DJucePlugin_Build_VST=0" "-DJucePlugin_Build_VST3=0" "-DJucePlugin_Build_AU=0" "-DJucePlugin_Build_AUv3=0" "-DJucePlugin_Build_RTAS=0" "-DJucePlugin_Build_AAX=0" "-DJucePlugin_Build_Standalone=0" "-DJucePlugin_Build_Unity=0"
 | 
			
		||||
  JUCE_CPPFLAGS := $(DEPFLAGS) "-DLINUX=1" "-DNDEBUG=1" "-DJUCE_DISPLAY_SPLASH_SCREEN=0" "-DJUCE_USE_DARK_SPLASH_SCREEN=1" "-DJUCE_PROJUCER_VERSION=0x70002" "-DJUCE_MODULE_AVAILABLE_juce_analytics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_devices=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_formats=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_processors=1" "-DJUCE_MODULE_AVAILABLE_juce_audio_utils=1" "-DJUCE_MODULE_AVAILABLE_juce_box2d=1" "-DJUCE_MODULE_AVAILABLE_juce_core=1" "-DJUCE_MODULE_AVAILABLE_juce_cryptography=1" "-DJUCE_MODULE_AVAILABLE_juce_data_structures=1" "-DJUCE_MODULE_AVAILABLE_juce_dsp=1" "-DJUCE_MODULE_AVAILABLE_juce_events=1" "-DJUCE_MODULE_AVAILABLE_juce_graphics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_basics=1" "-DJUCE_MODULE_AVAILABLE_juce_gui_extra=1" "-DJUCE_MODULE_AVAILABLE_juce_opengl=1" "-DJUCE_MODULE_AVAILABLE_juce_osc=1" "-DJUCE_MODULE_AVAILABLE_juce_product_unlocking=1" "-DJUCE_MODULE_AVAILABLE_juce_video=1" "-DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1" "-DJUCE_USE_MP3AUDIOFORMAT=1" "-DJUCE_PLUGINHOST_VST3=1" "-DJUCE_PLUGINHOST_LV2=1" "-DJUCE_ALLOW_STATIC_NULL_VARIABLES=0" "-DJUCE_STRICT_REFCOUNTEDPOINTER=1" "-DJUCE_USE_CAMERA=1" "-DJUCE_STANDALONE_APPLICATION=1" "-DJUCE_DEMO_RUNNER=1" "-DJUCE_UNIT_TESTS=1" "-DJUCER_LINUX_MAKE_6D53C8B4=1" "-DJUCE_APP_VERSION=7.0.2" "-DJUCE_APP_VERSION_HEX=0x70002" $(shell $(PKG_CONFIG) --cflags alsa freetype2 libcurl webkit2gtk-4.0 gtk+-x11-3.0) -pthread -I../../../../modules/juce_audio_processors/format_types/LV2_SDK/lilv/src -I../../../../modules/juce_audio_processors/format_types/LV2_SDK/lilv -I../../../../modules/juce_audio_processors/format_types/LV2_SDK/sratom -I../../../../modules/juce_audio_processors/format_types/LV2_SDK/sord/src -I../../../../modules/juce_audio_processors/format_types/LV2_SDK/sord -I../../../../modules/juce_audio_processors/format_types/LV2_SDK/serd -I../../../../modules/juce_audio_processors/format_types/LV2_SDK/lv2 -I../../../../modules/juce_audio_processors/format_types/LV2_SDK -I../../../../modules/juce_audio_processors/format_types/VST3_SDK -I../../JuceLibraryCode -I../../../../modules $(CPPFLAGS)
 | 
			
		||||
  JUCE_CPPFLAGS_APP :=  "-DJucePlugin_Build_VST=0" "-DJucePlugin_Build_VST3=0" "-DJucePlugin_Build_AU=0" "-DJucePlugin_Build_AUv3=0" "-DJucePlugin_Build_AAX=0" "-DJucePlugin_Build_Standalone=0" "-DJucePlugin_Build_Unity=0" "-DJucePlugin_Build_LV2=0"
 | 
			
		||||
  JUCE_TARGET_APP := DemoRunner
 | 
			
		||||
 | 
			
		||||
  JUCE_CFLAGS += $(JUCE_CPPFLAGS) $(TARGET_ARCH) -O3 $(CFLAGS)
 | 
			
		||||
  JUCE_CXXFLAGS += $(JUCE_CFLAGS) -std=c++14 $(CXXFLAGS)
 | 
			
		||||
  JUCE_LDFLAGS += $(TARGET_ARCH) -L$(JUCE_BINDIR) -L$(JUCE_LIBDIR) $(shell pkg-config --libs alsa freetype2 libcurl) -fvisibility=hidden -lrt -ldl -lpthread -lGL $(LDFLAGS)
 | 
			
		||||
  JUCE_LDFLAGS += $(TARGET_ARCH) -L$(JUCE_BINDIR) -L$(JUCE_LIBDIR) $(shell $(PKG_CONFIG) --libs alsa freetype2 libcurl) -fvisibility=hidden -lrt -ldl -lpthread -lGL $(LDFLAGS)
 | 
			
		||||
 | 
			
		||||
  CLEANCMD = rm -rf $(JUCE_OUTDIR)/$(TARGET) $(JUCE_OBJDIR)
 | 
			
		||||
endif
 | 
			
		||||
@@ -79,6 +83,8 @@ OBJECTS_APP := \
 | 
			
		||||
  $(JUCE_OBJDIR)/include_juce_audio_devices_63111d02.o \
 | 
			
		||||
  $(JUCE_OBJDIR)/include_juce_audio_formats_15f82001.o \
 | 
			
		||||
  $(JUCE_OBJDIR)/include_juce_audio_processors_10c03666.o \
 | 
			
		||||
  $(JUCE_OBJDIR)/include_juce_audio_processors_ara_2a4c6ef7.o \
 | 
			
		||||
  $(JUCE_OBJDIR)/include_juce_audio_processors_lv2_libs_12bdca08.o \
 | 
			
		||||
  $(JUCE_OBJDIR)/include_juce_audio_utils_9f9fb2d6.o \
 | 
			
		||||
  $(JUCE_OBJDIR)/include_juce_box2d_b0305d8b.o \
 | 
			
		||||
  $(JUCE_OBJDIR)/include_juce_core_f26d17db.o \
 | 
			
		||||
@@ -99,8 +105,8 @@ OBJECTS_APP := \
 | 
			
		||||
all : $(JUCE_OUTDIR)/$(JUCE_TARGET_APP)
 | 
			
		||||
 | 
			
		||||
$(JUCE_OUTDIR)/$(JUCE_TARGET_APP) : $(OBJECTS_APP) $(RESOURCES)
 | 
			
		||||
	@command -v pkg-config >/dev/null 2>&1 || { echo >&2 "pkg-config not installed. Please, install it."; exit 1; }
 | 
			
		||||
	@pkg-config --print-errors alsa freetype2 libcurl
 | 
			
		||||
	@command -v $(PKG_CONFIG) >/dev/null 2>&1 || { echo >&2 "pkg-config not installed. Please, install it."; exit 1; }
 | 
			
		||||
	@$(PKG_CONFIG) --print-errors alsa freetype2 libcurl
 | 
			
		||||
	@echo Linking "DemoRunner - App"
 | 
			
		||||
	-$(V_AT)mkdir -p $(JUCE_BINDIR)
 | 
			
		||||
	-$(V_AT)mkdir -p $(JUCE_LIBDIR)
 | 
			
		||||
@@ -162,6 +168,16 @@ $(JUCE_OBJDIR)/include_juce_audio_processors_10c03666.o: ../../JuceLibraryCode/i
 | 
			
		||||
	@echo "Compiling include_juce_audio_processors.cpp"
 | 
			
		||||
	$(V_AT)$(CXX) $(JUCE_CXXFLAGS) $(JUCE_CPPFLAGS_APP) $(JUCE_CFLAGS_APP) -o "$@" -c "$<"
 | 
			
		||||
 | 
			
		||||
$(JUCE_OBJDIR)/include_juce_audio_processors_ara_2a4c6ef7.o: ../../JuceLibraryCode/include_juce_audio_processors_ara.cpp
 | 
			
		||||
	-$(V_AT)mkdir -p $(JUCE_OBJDIR)
 | 
			
		||||
	@echo "Compiling include_juce_audio_processors_ara.cpp"
 | 
			
		||||
	$(V_AT)$(CXX) $(JUCE_CXXFLAGS) $(JUCE_CPPFLAGS_APP) $(JUCE_CFLAGS_APP) -o "$@" -c "$<"
 | 
			
		||||
 | 
			
		||||
$(JUCE_OBJDIR)/include_juce_audio_processors_lv2_libs_12bdca08.o: ../../JuceLibraryCode/include_juce_audio_processors_lv2_libs.cpp
 | 
			
		||||
	-$(V_AT)mkdir -p $(JUCE_OBJDIR)
 | 
			
		||||
	@echo "Compiling include_juce_audio_processors_lv2_libs.cpp"
 | 
			
		||||
	$(V_AT)$(CXX) $(JUCE_CXXFLAGS) $(JUCE_CPPFLAGS_APP) $(JUCE_CFLAGS_APP) -o "$@" -c "$<"
 | 
			
		||||
 | 
			
		||||
$(JUCE_OBJDIR)/include_juce_audio_utils_9f9fb2d6.o: ../../JuceLibraryCode/include_juce_audio_utils.cpp
 | 
			
		||||
	-$(V_AT)mkdir -p $(JUCE_OBJDIR)
 | 
			
		||||
	@echo "Compiling include_juce_audio_utils.cpp"
 | 
			
		||||
 
 | 
			
		||||
@@ -25,8 +25,10 @@
 | 
			
		||||
		527DA2E6827BAFDDD3E8E80F /* CoreAudioKit.framework */ = {isa = PBXBuildFile; fileRef = B4389672DA4CC8E0A531062D; };
 | 
			
		||||
		5CB78489F16E82144914972D /* include_juce_gui_extra.mm */ = {isa = PBXBuildFile; fileRef = 979F23EA9E5E76131299E886; };
 | 
			
		||||
		5E4310B3F6BB639875D3E9B8 /* Foundation.framework */ = {isa = PBXBuildFile; fileRef = 49ECA8B998B339A083674A22; };
 | 
			
		||||
		5EB6872A39122A5AB67E544E /* include_juce_audio_processors_ara.cpp */ = {isa = PBXBuildFile; fileRef = 8D44097417573B38729A0179; };
 | 
			
		||||
		611298FAC1A543BDD10D4C41 /* include_juce_box2d.cpp */ = {isa = PBXBuildFile; fileRef = 4DF215D350FFE5E119CBA7E5; };
 | 
			
		||||
		63A2F309E55DAC206E9B97E3 /* App */ = {isa = PBXBuildFile; fileRef = CFF2BBEB242CC8B3B904B5F9; };
 | 
			
		||||
		67D7E529C3713ED79F5F3AA9 /* include_juce_audio_processors_lv2_libs.cpp */ = {isa = PBXBuildFile; fileRef = 5BD7D121AD30987C08BE10E8; };
 | 
			
		||||
		6A61CBB4E39BFD392D97528F /* CoreMIDI.framework */ = {isa = PBXBuildFile; fileRef = 61AE09C749B007B70A265D9B; };
 | 
			
		||||
		6B5560283DEEBD6DD2D6C984 /* include_juce_dsp.mm */ = {isa = PBXBuildFile; fileRef = C1E93FAF6C68A40A664422CD; };
 | 
			
		||||
		712D81867EC698463252FA79 /* include_juce_audio_utils.mm */ = {isa = PBXBuildFile; fileRef = EDDA01B246C6128CAF7A2914; };
 | 
			
		||||
@@ -35,7 +37,6 @@
 | 
			
		||||
		7B4163348896EB1B86B15160 /* AVFoundation.framework */ = {isa = PBXBuildFile; fileRef = DC192EFA899E6CBE6B5CD394; };
 | 
			
		||||
		8584640341100008744861A5 /* IOKit.framework */ = {isa = PBXBuildFile; fileRef = 71A91516AFD980FEE694C0E1; };
 | 
			
		||||
		89AD16514B1F4133FFEA1DF9 /* WebKit.framework */ = {isa = PBXBuildFile; fileRef = 96D99A08027CA35D6A4E5CFD; };
 | 
			
		||||
		89BC6E2354102D975E08E918 /* Carbon.framework */ = {isa = PBXBuildFile; fileRef = 440D507FD8F31DB62B1F95C7; };
 | 
			
		||||
		8C0AEA08A71075A6C765AEC9 /* AVKit.framework */ = {isa = PBXBuildFile; fileRef = 3B99CF94C44E2EE04635A439; };
 | 
			
		||||
		91CD2BCE4CA07E18229EB436 /* RecentFilesMenuTemplate.nib */ = {isa = PBXBuildFile; fileRef = 9672FCE6167ADB567A9EB2F8; };
 | 
			
		||||
		9BEA1428416CE06BF72FBAB8 /* DiscRecording.framework */ = {isa = PBXBuildFile; fileRef = 3DC90DA86565B0356B6E5E0B; };
 | 
			
		||||
@@ -80,7 +81,6 @@
 | 
			
		||||
		3DC90DA86565B0356B6E5E0B /* DiscRecording.framework */ /* DiscRecording.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = DiscRecording.framework; path = System/Library/Frameworks/DiscRecording.framework; sourceTree = SDKROOT; };
 | 
			
		||||
		3E4ED41C374261CFFD309743 /* include_juce_graphics.mm */ /* include_juce_graphics.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = include_juce_graphics.mm; path = ../../JuceLibraryCode/include_juce_graphics.mm; sourceTree = SOURCE_ROOT; };
 | 
			
		||||
		40BD06D4AB0D2C73E936A2F1 /* OpenGL.framework */ /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = System/Library/Frameworks/OpenGL.framework; sourceTree = SDKROOT; };
 | 
			
		||||
		440D507FD8F31DB62B1F95C7 /* Carbon.framework */ /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = System/Library/Frameworks/Carbon.framework; sourceTree = SDKROOT; };
 | 
			
		||||
		470C3E4553B513FFEF752779 /* AudioToolbox.framework */ /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
 | 
			
		||||
		491641F7632BCC81BBA0ED85 /* juce_audio_formats */ /* juce_audio_formats */ = {isa = PBXFileReference; lastKnownFileType = folder; name = juce_audio_formats; path = ../../../../modules/juce_audio_formats; sourceTree = SOURCE_ROOT; };
 | 
			
		||||
		49ECA8B998B339A083674A22 /* Foundation.framework */ /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
 | 
			
		||||
@@ -91,6 +91,7 @@
 | 
			
		||||
		4FE6029FF76BCE9698595DC5 /* juce_product_unlocking */ /* juce_product_unlocking */ = {isa = PBXFileReference; lastKnownFileType = folder; name = juce_product_unlocking; path = ../../../../modules/juce_product_unlocking; sourceTree = SOURCE_ROOT; };
 | 
			
		||||
		5965349393850F41DF76F350 /* include_juce_analytics.cpp */ /* include_juce_analytics.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = include_juce_analytics.cpp; path = ../../JuceLibraryCode/include_juce_analytics.cpp; sourceTree = SOURCE_ROOT; };
 | 
			
		||||
		5A9F2000C66D24E8B01BE60B /* juce_gui_basics */ /* juce_gui_basics */ = {isa = PBXFileReference; lastKnownFileType = folder; name = juce_gui_basics; path = ../../../../modules/juce_gui_basics; sourceTree = SOURCE_ROOT; };
 | 
			
		||||
		5BD7D121AD30987C08BE10E8 /* include_juce_audio_processors_lv2_libs.cpp */ /* include_juce_audio_processors_lv2_libs.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = include_juce_audio_processors_lv2_libs.cpp; path = ../../JuceLibraryCode/include_juce_audio_processors_lv2_libs.cpp; sourceTree = SOURCE_ROOT; };
 | 
			
		||||
		5CD17151385A69F1E07FE85B /* DSP */ /* DSP */ = {isa = PBXFileReference; lastKnownFileType = folder; name = DSP; path = ../../../DSP; sourceTree = "<group>"; };
 | 
			
		||||
		60F2869DC345EAF2314D6C09 /* juce_audio_devices */ /* juce_audio_devices */ = {isa = PBXFileReference; lastKnownFileType = folder; name = juce_audio_devices; path = ../../../../modules/juce_audio_devices; sourceTree = SOURCE_ROOT; };
 | 
			
		||||
		61AE09C749B007B70A265D9B /* CoreMIDI.framework */ /* CoreMIDI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMIDI.framework; path = System/Library/Frameworks/CoreMIDI.framework; sourceTree = SDKROOT; };
 | 
			
		||||
@@ -104,6 +105,7 @@
 | 
			
		||||
		7A5AAE9EE573FC6105CC4AAC /* SettingsContent.h */ /* SettingsContent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SettingsContent.h; path = ../../Source/UI/SettingsContent.h; sourceTree = SOURCE_ROOT; };
 | 
			
		||||
		7B3243C92248D379A0489AA4 /* Utilities */ /* Utilities */ = {isa = PBXFileReference; lastKnownFileType = folder; name = Utilities; path = ../../../Utilities; sourceTree = "<group>"; };
 | 
			
		||||
		8CE533D611CD0984AD028D73 /* juce_graphics */ /* juce_graphics */ = {isa = PBXFileReference; lastKnownFileType = folder; name = juce_graphics; path = ../../../../modules/juce_graphics; sourceTree = SOURCE_ROOT; };
 | 
			
		||||
		8D44097417573B38729A0179 /* include_juce_audio_processors_ara.cpp */ /* include_juce_audio_processors_ara.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = include_juce_audio_processors_ara.cpp; path = ../../JuceLibraryCode/include_juce_audio_processors_ara.cpp; sourceTree = SOURCE_ROOT; };
 | 
			
		||||
		903CD4126C779884797EF915 /* juce_core */ /* juce_core */ = {isa = PBXFileReference; lastKnownFileType = folder; name = juce_core; path = ../../../../modules/juce_core; sourceTree = SOURCE_ROOT; };
 | 
			
		||||
		9144821E003E15E4042B57DB /* include_juce_video.mm */ /* include_juce_video.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = include_juce_video.mm; path = ../../JuceLibraryCode/include_juce_video.mm; sourceTree = SOURCE_ROOT; };
 | 
			
		||||
		934ACDCB3FD9D223A3481D8F /* JUCEDemos.cpp */ /* JUCEDemos.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = JUCEDemos.cpp; path = ../../Source/Demos/JUCEDemos.cpp; sourceTree = SOURCE_ROOT; };
 | 
			
		||||
@@ -146,7 +148,6 @@
 | 
			
		||||
				163B0CF2DD0990A63DF1D5A6,
 | 
			
		||||
				7B4163348896EB1B86B15160,
 | 
			
		||||
				8C0AEA08A71075A6C765AEC9,
 | 
			
		||||
				89BC6E2354102D975E08E918,
 | 
			
		||||
				9F15FD7A7CE83CFD98F07D59,
 | 
			
		||||
				1351A13E78F38741C6075600,
 | 
			
		||||
				527DA2E6827BAFDDD3E8E80F,
 | 
			
		||||
@@ -171,7 +172,6 @@
 | 
			
		||||
				470C3E4553B513FFEF752779,
 | 
			
		||||
				DC192EFA899E6CBE6B5CD394,
 | 
			
		||||
				3B99CF94C44E2EE04635A439,
 | 
			
		||||
				440D507FD8F31DB62B1F95C7,
 | 
			
		||||
				02A2ED58B066B4D119F67913,
 | 
			
		||||
				4F0A137A4115946A346180E6,
 | 
			
		||||
				B4389672DA4CC8E0A531062D,
 | 
			
		||||
@@ -221,6 +221,8 @@
 | 
			
		||||
				03A63C3CA6F24977F19C316D,
 | 
			
		||||
				E061A1C75FA5722167FC4997,
 | 
			
		||||
				E67AB94002886AF67437D6AE,
 | 
			
		||||
				8D44097417573B38729A0179,
 | 
			
		||||
				5BD7D121AD30987C08BE10E8,
 | 
			
		||||
				EDDA01B246C6128CAF7A2914,
 | 
			
		||||
				4DF215D350FFE5E119CBA7E5,
 | 
			
		||||
				3BC9753E0CD75A36DC742EE0,
 | 
			
		||||
@@ -345,7 +347,7 @@
 | 
			
		||||
		AC6F0E9A0809A184B2C2B7DE = {
 | 
			
		||||
			isa = PBXProject;
 | 
			
		||||
			attributes = {
 | 
			
		||||
				LastUpgradeCheck = 1300;
 | 
			
		||||
				LastUpgradeCheck = 1340;
 | 
			
		||||
				ORGANIZATIONNAME = "Raw Material Software Limited";
 | 
			
		||||
				TargetAttributes = {
 | 
			
		||||
					291E01DCBE746A376DBFA4D1 = {
 | 
			
		||||
@@ -421,6 +423,8 @@
 | 
			
		||||
				9EACEA6BE8D0ACC72C12C080,
 | 
			
		||||
				26652AB1BB77C8A39434775F,
 | 
			
		||||
				2707968B431D83AC7E28E49B,
 | 
			
		||||
				5EB6872A39122A5AB67E544E,
 | 
			
		||||
				67D7E529C3713ED79F5F3AA9,
 | 
			
		||||
				712D81867EC698463252FA79,
 | 
			
		||||
				611298FAC1A543BDD10D4C41,
 | 
			
		||||
				D183F8140174ACCDDCD230A2,
 | 
			
		||||
@@ -499,6 +503,7 @@
 | 
			
		||||
				COMBINE_HIDPI_IMAGES = YES;
 | 
			
		||||
				CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)";
 | 
			
		||||
				DEAD_CODE_STRIPPING = YES;
 | 
			
		||||
				EXCLUDED_ARCHS = "";
 | 
			
		||||
				GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
 | 
			
		||||
				GCC_OPTIMIZATION_LEVEL = 3;
 | 
			
		||||
				GCC_PREPROCESSOR_DEFINITIONS = (
 | 
			
		||||
@@ -506,7 +511,7 @@
 | 
			
		||||
					"NDEBUG=1",
 | 
			
		||||
					"JUCE_DISPLAY_SPLASH_SCREEN=0",
 | 
			
		||||
					"JUCE_USE_DARK_SPLASH_SCREEN=1",
 | 
			
		||||
					"JUCE_PROJUCER_VERSION=0x60102",
 | 
			
		||||
					"JUCE_PROJUCER_VERSION=0x70002",
 | 
			
		||||
					"JUCE_MODULE_AVAILABLE_juce_analytics=1",
 | 
			
		||||
					"JUCE_MODULE_AVAILABLE_juce_audio_basics=1",
 | 
			
		||||
					"JUCE_MODULE_AVAILABLE_juce_audio_devices=1",
 | 
			
		||||
@@ -528,6 +533,8 @@
 | 
			
		||||
					"JUCE_MODULE_AVAILABLE_juce_video=1",
 | 
			
		||||
					"JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1",
 | 
			
		||||
					"JUCE_USE_MP3AUDIOFORMAT=1",
 | 
			
		||||
					"JUCE_PLUGINHOST_VST3=1",
 | 
			
		||||
					"JUCE_PLUGINHOST_LV2=1",
 | 
			
		||||
					"JUCE_ALLOW_STATIC_NULL_VARIABLES=0",
 | 
			
		||||
					"JUCE_STRICT_REFCOUNTEDPOINTER=1",
 | 
			
		||||
					"JUCE_USE_CAMERA=1",
 | 
			
		||||
@@ -535,19 +542,28 @@
 | 
			
		||||
					"JUCE_DEMO_RUNNER=1",
 | 
			
		||||
					"JUCE_UNIT_TESTS=1",
 | 
			
		||||
					"JUCER_XCODE_MAC_F6D2F4CF=1",
 | 
			
		||||
					"JUCE_APP_VERSION=6.1.2",
 | 
			
		||||
					"JUCE_APP_VERSION_HEX=0x60102",
 | 
			
		||||
					"JUCE_APP_VERSION=7.0.2",
 | 
			
		||||
					"JUCE_APP_VERSION_HEX=0x70002",
 | 
			
		||||
					"JucePlugin_Build_VST=0",
 | 
			
		||||
					"JucePlugin_Build_VST3=0",
 | 
			
		||||
					"JucePlugin_Build_AU=0",
 | 
			
		||||
					"JucePlugin_Build_AUv3=0",
 | 
			
		||||
					"JucePlugin_Build_RTAS=0",
 | 
			
		||||
					"JucePlugin_Build_AAX=0",
 | 
			
		||||
					"JucePlugin_Build_Standalone=0",
 | 
			
		||||
					"JucePlugin_Build_Unity=0",
 | 
			
		||||
					"JucePlugin_Build_LV2=0",
 | 
			
		||||
				);
 | 
			
		||||
				GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
 | 
			
		||||
				HEADER_SEARCH_PATHS = (
 | 
			
		||||
					"$(SRCROOT)/../../../../modules/juce_audio_processors/format_types/LV2_SDK/lilv/src",
 | 
			
		||||
					"$(SRCROOT)/../../../../modules/juce_audio_processors/format_types/LV2_SDK/lilv",
 | 
			
		||||
					"$(SRCROOT)/../../../../modules/juce_audio_processors/format_types/LV2_SDK/sratom",
 | 
			
		||||
					"$(SRCROOT)/../../../../modules/juce_audio_processors/format_types/LV2_SDK/sord/src",
 | 
			
		||||
					"$(SRCROOT)/../../../../modules/juce_audio_processors/format_types/LV2_SDK/sord",
 | 
			
		||||
					"$(SRCROOT)/../../../../modules/juce_audio_processors/format_types/LV2_SDK/serd",
 | 
			
		||||
					"$(SRCROOT)/../../../../modules/juce_audio_processors/format_types/LV2_SDK/lv2",
 | 
			
		||||
					"$(SRCROOT)/../../../../modules/juce_audio_processors/format_types/LV2_SDK",
 | 
			
		||||
					"$(SRCROOT)/../../../../modules/juce_audio_processors/format_types/VST3_SDK",
 | 
			
		||||
					"$(SRCROOT)/../../JuceLibraryCode",
 | 
			
		||||
					"$(SRCROOT)/../../../../modules",
 | 
			
		||||
					"$(inherited)",
 | 
			
		||||
@@ -557,9 +573,10 @@
 | 
			
		||||
				INSTALL_PATH = "$(HOME)/Applications";
 | 
			
		||||
				LLVM_LTO = YES;
 | 
			
		||||
				MACOSX_DEPLOYMENT_TARGET = 10.11;
 | 
			
		||||
				MTL_HEADER_SEARCH_PATHS = "$(SRCROOT)/../../JuceLibraryCode $(SRCROOT)/../../../../modules";
 | 
			
		||||
				OTHER_CFLAGS = "-Wall -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wswitch-enum -Wsign-conversion -Wsign-compare -Wunreachable-code -Wcast-align -Wno-ignored-qualifiers -Wshorten-64-to-32 -Wconversion -Wint-conversion -Wconditional-uninitialized -Wconstant-conversion -Wbool-conversion -Wextra-semi -Wshift-sign-overflow -Wno-missing-field-initializers -Wshadow-all -Wnullable-to-nonnull-conversion";
 | 
			
		||||
				OTHER_CPLUSPLUSFLAGS = "-Woverloaded-virtual -Wreorder -Wzero-as-null-pointer-constant -Wunused-private-field -Winconsistent-missing-destructor-override -Wall -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wswitch-enum -Wsign-conversion -Wsign-compare -Wunreachable-code -Wcast-align -Wno-ignored-qualifiers -Wshorten-64-to-32 -Wconversion -Wint-conversion -Wconditional-uninitialized -Wconstant-conversion -Wbool-conversion -Wextra-semi -Wshift-sign-overflow -Wno-missing-field-initializers -Wshadow-all -Wnullable-to-nonnull-conversion";
 | 
			
		||||
				MTL_HEADER_SEARCH_PATHS = "$(SRCROOT)/../../../../modules/juce_audio_processors/format_types/LV2_SDK/lilv/src $(SRCROOT)/../../../../modules/juce_audio_processors/format_types/LV2_SDK/lilv $(SRCROOT)/../../../../modules/juce_audio_processors/format_types/LV2_SDK/sratom $(SRCROOT)/../../../../modules/juce_audio_processors/format_types/LV2_SDK/sord/src $(SRCROOT)/../../../../modules/juce_audio_processors/format_types/LV2_SDK/sord $(SRCROOT)/../../../../modules/juce_audio_processors/format_types/LV2_SDK/serd $(SRCROOT)/../../../../modules/juce_audio_processors/format_types/LV2_SDK/lv2 $(SRCROOT)/../../../../modules/juce_audio_processors/format_types/LV2_SDK $(SRCROOT)/../../../../modules/juce_audio_processors/format_types/VST3_SDK $(SRCROOT)/../../JuceLibraryCode $(SRCROOT)/../../../../modules";
 | 
			
		||||
				OTHER_CFLAGS = "-Wall -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wswitch-enum -Wsign-conversion -Wsign-compare -Wunreachable-code -Wcast-align -Wno-ignored-qualifiers -Wshorten-64-to-32 -Wconversion -Wint-conversion -Wconditional-uninitialized -Wconstant-conversion -Wbool-conversion -Wextra-semi -Wshift-sign-overflow -Wshadow-all -Wnullable-to-nonnull-conversion -Wmissing-prototypes -Wunguarded-availability -Wunguarded-availability-new";
 | 
			
		||||
				OTHER_CPLUSPLUSFLAGS = "-Woverloaded-virtual -Wreorder -Wzero-as-null-pointer-constant -Wunused-private-field -Winconsistent-missing-destructor-override -Wall -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wswitch-enum -Wsign-conversion -Wsign-compare -Wunreachable-code -Wcast-align -Wno-ignored-qualifiers -Wshorten-64-to-32 -Wconversion -Wint-conversion -Wconditional-uninitialized -Wconstant-conversion -Wbool-conversion -Wextra-semi -Wshift-sign-overflow -Wshadow-all -Wnullable-to-nonnull-conversion -Wmissing-prototypes -Wunguarded-availability -Wunguarded-availability-new";
 | 
			
		||||
				OTHER_LDFLAGS = "-weak_framework Metal -weak_framework MetalKit";
 | 
			
		||||
				PRODUCT_BUNDLE_IDENTIFIER = com.rmsl.jucedemorunner;
 | 
			
		||||
				PRODUCT_NAME = "DemoRunner";
 | 
			
		||||
				USE_HEADERMAP = NO;
 | 
			
		||||
@@ -578,6 +595,7 @@
 | 
			
		||||
				COMBINE_HIDPI_IMAGES = YES;
 | 
			
		||||
				CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)";
 | 
			
		||||
				COPY_PHASE_STRIP = NO;
 | 
			
		||||
				EXCLUDED_ARCHS = "";
 | 
			
		||||
				GCC_DYNAMIC_NO_PIC = NO;
 | 
			
		||||
				GCC_OPTIMIZATION_LEVEL = 0;
 | 
			
		||||
				GCC_PREPROCESSOR_DEFINITIONS = (
 | 
			
		||||
@@ -585,7 +603,7 @@
 | 
			
		||||
					"DEBUG=1",
 | 
			
		||||
					"JUCE_DISPLAY_SPLASH_SCREEN=0",
 | 
			
		||||
					"JUCE_USE_DARK_SPLASH_SCREEN=1",
 | 
			
		||||
					"JUCE_PROJUCER_VERSION=0x60102",
 | 
			
		||||
					"JUCE_PROJUCER_VERSION=0x70002",
 | 
			
		||||
					"JUCE_MODULE_AVAILABLE_juce_analytics=1",
 | 
			
		||||
					"JUCE_MODULE_AVAILABLE_juce_audio_basics=1",
 | 
			
		||||
					"JUCE_MODULE_AVAILABLE_juce_audio_devices=1",
 | 
			
		||||
@@ -607,6 +625,8 @@
 | 
			
		||||
					"JUCE_MODULE_AVAILABLE_juce_video=1",
 | 
			
		||||
					"JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1",
 | 
			
		||||
					"JUCE_USE_MP3AUDIOFORMAT=1",
 | 
			
		||||
					"JUCE_PLUGINHOST_VST3=1",
 | 
			
		||||
					"JUCE_PLUGINHOST_LV2=1",
 | 
			
		||||
					"JUCE_ALLOW_STATIC_NULL_VARIABLES=0",
 | 
			
		||||
					"JUCE_STRICT_REFCOUNTEDPOINTER=1",
 | 
			
		||||
					"JUCE_USE_CAMERA=1",
 | 
			
		||||
@@ -614,19 +634,28 @@
 | 
			
		||||
					"JUCE_DEMO_RUNNER=1",
 | 
			
		||||
					"JUCE_UNIT_TESTS=1",
 | 
			
		||||
					"JUCER_XCODE_MAC_F6D2F4CF=1",
 | 
			
		||||
					"JUCE_APP_VERSION=6.1.2",
 | 
			
		||||
					"JUCE_APP_VERSION_HEX=0x60102",
 | 
			
		||||
					"JUCE_APP_VERSION=7.0.2",
 | 
			
		||||
					"JUCE_APP_VERSION_HEX=0x70002",
 | 
			
		||||
					"JucePlugin_Build_VST=0",
 | 
			
		||||
					"JucePlugin_Build_VST3=0",
 | 
			
		||||
					"JucePlugin_Build_AU=0",
 | 
			
		||||
					"JucePlugin_Build_AUv3=0",
 | 
			
		||||
					"JucePlugin_Build_RTAS=0",
 | 
			
		||||
					"JucePlugin_Build_AAX=0",
 | 
			
		||||
					"JucePlugin_Build_Standalone=0",
 | 
			
		||||
					"JucePlugin_Build_Unity=0",
 | 
			
		||||
					"JucePlugin_Build_LV2=0",
 | 
			
		||||
				);
 | 
			
		||||
				GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
 | 
			
		||||
				HEADER_SEARCH_PATHS = (
 | 
			
		||||
					"$(SRCROOT)/../../../../modules/juce_audio_processors/format_types/LV2_SDK/lilv/src",
 | 
			
		||||
					"$(SRCROOT)/../../../../modules/juce_audio_processors/format_types/LV2_SDK/lilv",
 | 
			
		||||
					"$(SRCROOT)/../../../../modules/juce_audio_processors/format_types/LV2_SDK/sratom",
 | 
			
		||||
					"$(SRCROOT)/../../../../modules/juce_audio_processors/format_types/LV2_SDK/sord/src",
 | 
			
		||||
					"$(SRCROOT)/../../../../modules/juce_audio_processors/format_types/LV2_SDK/sord",
 | 
			
		||||
					"$(SRCROOT)/../../../../modules/juce_audio_processors/format_types/LV2_SDK/serd",
 | 
			
		||||
					"$(SRCROOT)/../../../../modules/juce_audio_processors/format_types/LV2_SDK/lv2",
 | 
			
		||||
					"$(SRCROOT)/../../../../modules/juce_audio_processors/format_types/LV2_SDK",
 | 
			
		||||
					"$(SRCROOT)/../../../../modules/juce_audio_processors/format_types/VST3_SDK",
 | 
			
		||||
					"$(SRCROOT)/../../JuceLibraryCode",
 | 
			
		||||
					"$(SRCROOT)/../../../../modules",
 | 
			
		||||
					"$(inherited)",
 | 
			
		||||
@@ -635,9 +664,10 @@
 | 
			
		||||
				INFOPLIST_PREPROCESS = NO;
 | 
			
		||||
				INSTALL_PATH = "$(HOME)/Applications";
 | 
			
		||||
				MACOSX_DEPLOYMENT_TARGET = 10.11;
 | 
			
		||||
				MTL_HEADER_SEARCH_PATHS = "$(SRCROOT)/../../JuceLibraryCode $(SRCROOT)/../../../../modules";
 | 
			
		||||
				OTHER_CFLAGS = "-Wall -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wswitch-enum -Wsign-conversion -Wsign-compare -Wunreachable-code -Wcast-align -Wno-ignored-qualifiers -Wshorten-64-to-32 -Wconversion -Wint-conversion -Wconditional-uninitialized -Wconstant-conversion -Wbool-conversion -Wextra-semi -Wshift-sign-overflow -Wno-missing-field-initializers -Wshadow-all -Wnullable-to-nonnull-conversion";
 | 
			
		||||
				OTHER_CPLUSPLUSFLAGS = "-Woverloaded-virtual -Wreorder -Wzero-as-null-pointer-constant -Wunused-private-field -Winconsistent-missing-destructor-override -Wall -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wswitch-enum -Wsign-conversion -Wsign-compare -Wunreachable-code -Wcast-align -Wno-ignored-qualifiers -Wshorten-64-to-32 -Wconversion -Wint-conversion -Wconditional-uninitialized -Wconstant-conversion -Wbool-conversion -Wextra-semi -Wshift-sign-overflow -Wno-missing-field-initializers -Wshadow-all -Wnullable-to-nonnull-conversion";
 | 
			
		||||
				MTL_HEADER_SEARCH_PATHS = "$(SRCROOT)/../../../../modules/juce_audio_processors/format_types/LV2_SDK/lilv/src $(SRCROOT)/../../../../modules/juce_audio_processors/format_types/LV2_SDK/lilv $(SRCROOT)/../../../../modules/juce_audio_processors/format_types/LV2_SDK/sratom $(SRCROOT)/../../../../modules/juce_audio_processors/format_types/LV2_SDK/sord/src $(SRCROOT)/../../../../modules/juce_audio_processors/format_types/LV2_SDK/sord $(SRCROOT)/../../../../modules/juce_audio_processors/format_types/LV2_SDK/serd $(SRCROOT)/../../../../modules/juce_audio_processors/format_types/LV2_SDK/lv2 $(SRCROOT)/../../../../modules/juce_audio_processors/format_types/LV2_SDK $(SRCROOT)/../../../../modules/juce_audio_processors/format_types/VST3_SDK $(SRCROOT)/../../JuceLibraryCode $(SRCROOT)/../../../../modules";
 | 
			
		||||
				OTHER_CFLAGS = "-Wall -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wswitch-enum -Wsign-conversion -Wsign-compare -Wunreachable-code -Wcast-align -Wno-ignored-qualifiers -Wshorten-64-to-32 -Wconversion -Wint-conversion -Wconditional-uninitialized -Wconstant-conversion -Wbool-conversion -Wextra-semi -Wshift-sign-overflow -Wshadow-all -Wnullable-to-nonnull-conversion -Wmissing-prototypes -Wunguarded-availability -Wunguarded-availability-new";
 | 
			
		||||
				OTHER_CPLUSPLUSFLAGS = "-Woverloaded-virtual -Wreorder -Wzero-as-null-pointer-constant -Wunused-private-field -Winconsistent-missing-destructor-override -Wall -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wswitch-enum -Wsign-conversion -Wsign-compare -Wunreachable-code -Wcast-align -Wno-ignored-qualifiers -Wshorten-64-to-32 -Wconversion -Wint-conversion -Wconditional-uninitialized -Wconstant-conversion -Wbool-conversion -Wextra-semi -Wshift-sign-overflow -Wshadow-all -Wnullable-to-nonnull-conversion -Wmissing-prototypes -Wunguarded-availability -Wunguarded-availability-new";
 | 
			
		||||
				OTHER_LDFLAGS = "-weak_framework Metal -weak_framework MetalKit";
 | 
			
		||||
				PRODUCT_BUNDLE_IDENTIFIER = com.rmsl.jucedemorunner;
 | 
			
		||||
				PRODUCT_NAME = "DemoRunner";
 | 
			
		||||
				USE_HEADERMAP = NO;
 | 
			
		||||
 
 | 
			
		||||
@@ -7,6 +7,8 @@
 | 
			
		||||
    <string>This app requires audio input. If you do not have an audio interface connected it will use the built-in microphone.</string>
 | 
			
		||||
    <key>NSCameraUsageDescription</key>
 | 
			
		||||
    <string>This app requires access to the camera to function correctly.</string>
 | 
			
		||||
    <key>NSBluetoothAlwaysUsageDescription</key>
 | 
			
		||||
    <string>This app requires access to Bluetooth to function correctly.</string>
 | 
			
		||||
    <key>CFBundleExecutable</key>
 | 
			
		||||
    <string>${EXECUTABLE_NAME}</string>
 | 
			
		||||
    <key>CFBundleIconFile</key>
 | 
			
		||||
@@ -22,9 +24,9 @@
 | 
			
		||||
    <key>CFBundleSignature</key>
 | 
			
		||||
    <string>????</string>
 | 
			
		||||
    <key>CFBundleShortVersionString</key>
 | 
			
		||||
    <string>6.1.2</string>
 | 
			
		||||
    <string>7.0.2</string>
 | 
			
		||||
    <key>CFBundleVersion</key>
 | 
			
		||||
    <string>6.1.2</string>
 | 
			
		||||
    <string>7.0.2</string>
 | 
			
		||||
    <key>NSHumanReadableCopyright</key>
 | 
			
		||||
    <string>Copyright (c) 2020 - Raw Material Software Limited</string>
 | 
			
		||||
    <key>NSHighResolutionCapable</key>
 | 
			
		||||
 
 | 
			
		||||
@@ -1,5 +1,6 @@
 | 
			
		||||
Microsoft Visual Studio Solution File, Format Version 11.00
 | 
			
		||||
# Visual Studio 2017
 | 
			
		||||
 | 
			
		||||
Microsoft Visual Studio Solution File, Format Version 11.00
 | 
			
		||||
# Visual Studio 15
 | 
			
		||||
 | 
			
		||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DemoRunner - App", "DemoRunner_App.vcxproj", "{882FE2E3-F4EF-9825-1908-F6FEE5366B5C}"
 | 
			
		||||
EndProject
 | 
			
		||||
 
 | 
			
		||||
@@ -63,8 +63,8 @@
 | 
			
		||||
    <ClCompile>
 | 
			
		||||
      <Optimization>Disabled</Optimization>
 | 
			
		||||
      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
 | 
			
		||||
      <AdditionalIncludeDirectories>..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
 | 
			
		||||
      <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60102;JUCE_MODULE_AVAILABLE_juce_analytics=1;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_box2d=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_MODULE_AVAILABLE_juce_osc=1;JUCE_MODULE_AVAILABLE_juce_product_unlocking=1;JUCE_MODULE_AVAILABLE_juce_video=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_USE_MP3AUDIOFORMAT=1;JUCE_ALLOW_STATIC_NULL_VARIABLES=0;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_USE_CAMERA=1;JUCE_STANDALONE_APPLICATION=1;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=6.1.2;JUCE_APP_VERSION_HEX=0x60102;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
 | 
			
		||||
      <AdditionalIncludeDirectories>..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src;..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv;..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sratom;..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord\src;..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord;..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd;..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2;..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK;..\..\..\..\modules\juce_audio_processors\format_types\VST3_SDK;..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
 | 
			
		||||
      <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x70002;JUCE_MODULE_AVAILABLE_juce_analytics=1;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_box2d=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_MODULE_AVAILABLE_juce_osc=1;JUCE_MODULE_AVAILABLE_juce_product_unlocking=1;JUCE_MODULE_AVAILABLE_juce_video=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_USE_MP3AUDIOFORMAT=1;JUCE_PLUGINHOST_VST3=1;JUCE_PLUGINHOST_LV2=1;JUCE_ALLOW_STATIC_NULL_VARIABLES=0;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_USE_CAMERA=1;JUCE_STANDALONE_APPLICATION=1;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=7.0.2;JUCE_APP_VERSION_HEX=0x70002;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;JucePlugin_Build_LV2=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
 | 
			
		||||
      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
 | 
			
		||||
      <RuntimeTypeInfo>true</RuntimeTypeInfo>
 | 
			
		||||
      <PrecompiledHeader>NotUsing</PrecompiledHeader>
 | 
			
		||||
@@ -78,7 +78,8 @@
 | 
			
		||||
      <LanguageStandard>stdcpp14</LanguageStandard>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ResourceCompile>
 | 
			
		||||
      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
 | 
			
		||||
      <AdditionalIncludeDirectories>..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src;..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv;..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sratom;..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord\src;..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord;..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd;..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2;..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK;..\..\..\..\modules\juce_audio_processors\format_types\VST3_SDK;..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
 | 
			
		||||
      <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x70002;JUCE_MODULE_AVAILABLE_juce_analytics=1;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_box2d=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_MODULE_AVAILABLE_juce_osc=1;JUCE_MODULE_AVAILABLE_juce_product_unlocking=1;JUCE_MODULE_AVAILABLE_juce_video=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_USE_MP3AUDIOFORMAT=1;JUCE_PLUGINHOST_VST3=1;JUCE_PLUGINHOST_LV2=1;JUCE_ALLOW_STATIC_NULL_VARIABLES=0;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_USE_CAMERA=1;JUCE_STANDALONE_APPLICATION=1;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=7.0.2;JUCE_APP_VERSION_HEX=0x70002;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;JucePlugin_Build_LV2=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
 | 
			
		||||
    </ResourceCompile>
 | 
			
		||||
    <Link>
 | 
			
		||||
      <OutputFile>$(OutDir)\DemoRunner.exe</OutputFile>
 | 
			
		||||
@@ -105,8 +106,8 @@
 | 
			
		||||
    </Midl>
 | 
			
		||||
    <ClCompile>
 | 
			
		||||
      <Optimization>Full</Optimization>
 | 
			
		||||
      <AdditionalIncludeDirectories>..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
 | 
			
		||||
      <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60102;JUCE_MODULE_AVAILABLE_juce_analytics=1;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_box2d=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_MODULE_AVAILABLE_juce_osc=1;JUCE_MODULE_AVAILABLE_juce_product_unlocking=1;JUCE_MODULE_AVAILABLE_juce_video=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_USE_MP3AUDIOFORMAT=1;JUCE_ALLOW_STATIC_NULL_VARIABLES=0;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_USE_CAMERA=1;JUCE_STANDALONE_APPLICATION=1;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=6.1.2;JUCE_APP_VERSION_HEX=0x60102;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
 | 
			
		||||
      <AdditionalIncludeDirectories>..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src;..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv;..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sratom;..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord\src;..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord;..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd;..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2;..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK;..\..\..\..\modules\juce_audio_processors\format_types\VST3_SDK;..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
 | 
			
		||||
      <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x70002;JUCE_MODULE_AVAILABLE_juce_analytics=1;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_box2d=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_MODULE_AVAILABLE_juce_osc=1;JUCE_MODULE_AVAILABLE_juce_product_unlocking=1;JUCE_MODULE_AVAILABLE_juce_video=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_USE_MP3AUDIOFORMAT=1;JUCE_PLUGINHOST_VST3=1;JUCE_PLUGINHOST_LV2=1;JUCE_ALLOW_STATIC_NULL_VARIABLES=0;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_USE_CAMERA=1;JUCE_STANDALONE_APPLICATION=1;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=7.0.2;JUCE_APP_VERSION_HEX=0x70002;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;JucePlugin_Build_LV2=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
 | 
			
		||||
      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
 | 
			
		||||
      <RuntimeTypeInfo>true</RuntimeTypeInfo>
 | 
			
		||||
      <PrecompiledHeader>NotUsing</PrecompiledHeader>
 | 
			
		||||
@@ -120,7 +121,8 @@
 | 
			
		||||
      <LanguageStandard>stdcpp14</LanguageStandard>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ResourceCompile>
 | 
			
		||||
      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
 | 
			
		||||
      <AdditionalIncludeDirectories>..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src;..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv;..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sratom;..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord\src;..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord;..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd;..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2;..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK;..\..\..\..\modules\juce_audio_processors\format_types\VST3_SDK;..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
 | 
			
		||||
      <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x70002;JUCE_MODULE_AVAILABLE_juce_analytics=1;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_box2d=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_MODULE_AVAILABLE_juce_osc=1;JUCE_MODULE_AVAILABLE_juce_product_unlocking=1;JUCE_MODULE_AVAILABLE_juce_video=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_USE_MP3AUDIOFORMAT=1;JUCE_PLUGINHOST_VST3=1;JUCE_PLUGINHOST_LV2=1;JUCE_ALLOW_STATIC_NULL_VARIABLES=0;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_USE_CAMERA=1;JUCE_STANDALONE_APPLICATION=1;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=7.0.2;JUCE_APP_VERSION_HEX=0x70002;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;JucePlugin_Build_LV2=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
 | 
			
		||||
    </ResourceCompile>
 | 
			
		||||
    <Link>
 | 
			
		||||
      <OutputFile>$(OutDir)\DemoRunner.exe</OutputFile>
 | 
			
		||||
@@ -171,15 +173,15 @@
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\buffers\juce_FloatVectorOperations.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\midi\ump\juce_UMP_test.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\midi\ump\juce_UMPMidi1ToMidi2DefaultTranslator.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\midi\ump\juce_UMPSysEx7.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\midi\ump\juce_UMPTests.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\midi\ump\juce_UMPUtils.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
@@ -288,7 +290,7 @@
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_devices\audio_io\juce_AudioIODeviceType.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_devices\midi_io\ump\juce_UMPTests.cpp">
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_devices\audio_io\juce_SampleRateHelpers.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_devices\midi_io\juce_MidiDevices.cpp">
 | 
			
		||||
@@ -657,6 +659,9 @@
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\juce_WindowsMediaAudioFormat.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\format\juce_ARAAudioReaders.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\format\juce_AudioFormat.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
@@ -690,6 +695,123 @@
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format\juce_AudioPluginFormatManager.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\zix\tree.c">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\collections.c">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\filesystem.c">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\instance.c">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\lib.c">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\node.c">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\plugin.c">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\pluginclass.c">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\port.c">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\query.c">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\scalepoint.c">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\state.c">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\ui.c">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\util.c">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\world.c">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\atom\atom-test-utils.c">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\atom\atom-test.c">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\atom\forge-overflow-test.c">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\base64.c">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\byte_source.c">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\env.c">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\n3.c">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\node.c">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\reader.c">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\serdi.c">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\string.c">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\system.c">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\uri.c">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\writer.c">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord\src\zix\btree.c">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord\src\zix\digest.c">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord\src\zix\hash.c">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord\src\sord.c">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord\src\sord_test.c">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord\src\sord_validate.c">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord\src\sordi.c">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord\src\sordmm_test.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord\src\syntax.c">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sratom\src\sratom.c">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\VST3_SDK\base\source\baseiids.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
@@ -759,15 +881,33 @@
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\VST3_SDK\public.sdk\source\vst\vstpresetfile.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_ARACommon.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_ARAHosting.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_LADSPAPluginFormat.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_LegacyAudioParameter.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_LV2PluginFormat.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_LV2PluginFormat_test.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_LV2SupportLibs.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_VST3PluginFormat.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_VST3PluginFormat_test.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_VSTPluginFormat.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
@@ -801,6 +941,24 @@
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\scanning\juce_PluginListComponent.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\utilities\ARA\juce_ARA_utils.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\utilities\ARA\juce_ARADocumentController.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\utilities\ARA\juce_ARADocumentControllerCommon.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\utilities\ARA\juce_ARAModelObjects.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\utilities\ARA\juce_ARAPlugInInstanceRoles.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\utilities\ARA\juce_AudioProcessor_ARAExtensions.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_AudioParameterBool.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
@@ -819,6 +977,9 @@
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_AudioProcessorValueTreeState.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_NativeScaleFactorNotifier.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_ParameterAttachments.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
@@ -831,6 +992,12 @@
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\juce_audio_processors.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\juce_audio_processors_ara.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\juce_audio_processors_lv2_libs.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_utils\audio_cd\juce_AudioCDReader.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
@@ -849,9 +1016,15 @@
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_utils\gui\juce_AudioVisualiserComponent.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_utils\gui\juce_KeyboardComponentBase.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_utils\gui\juce_MidiKeyboardComponent.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_utils\gui\juce_MPEKeyboardComponent.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_utils\native\juce_android_BluetoothMidiDevicePairingDialogue.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
@@ -1032,9 +1205,15 @@
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_HashMap_test.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_ListenerList.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_NamedValueSet.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_Optional_test.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_OwnedArray.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
@@ -1050,6 +1229,9 @@
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_Variant.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_core\files\juce_common_MimeTypes.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_core\files\juce_DirectoryIterator.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
@@ -1116,6 +1298,9 @@
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_core\misc\juce_Uuid.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_android_AndroidDocument.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_android_Files.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
@@ -1371,10 +1556,10 @@
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_data_structures\values\juce_ValueTree.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_data_structures\values\juce_ValueTreeSynchroniser.cpp">
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_data_structures\values\juce_ValueTreePropertyWithDefault_test.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_data_structures\values\juce_ValueWithDefault.cpp">
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_data_structures\values\juce_ValueTreeSynchroniser.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_data_structures\juce_data_structures.cpp">
 | 
			
		||||
@@ -1605,6 +1790,9 @@
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_graphics\geometry\juce_PathStrokeType.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_graphics\geometry\juce_Rectangle_test.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jcapimin.c">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
@@ -2082,6 +2270,9 @@
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\misc\juce_DropShadower.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\misc\juce_FocusOutline.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\misc\juce_JUCESplashScreen.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
@@ -2106,6 +2297,9 @@
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_MouseListener.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\accessibility\juce_AccessibilityTextHelpers_test.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\accessibility\juce_android_Accessibility.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
@@ -2133,9 +2327,6 @@
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\juce_android_Windowing.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\juce_common_MimeTypes.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\juce_ios_ContentSharer.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
@@ -2455,7 +2646,11 @@
 | 
			
		||||
    <ClCompile Include="..\..\JuceLibraryCode\include_juce_audio_basics.cpp"/>
 | 
			
		||||
    <ClCompile Include="..\..\JuceLibraryCode\include_juce_audio_devices.cpp"/>
 | 
			
		||||
    <ClCompile Include="..\..\JuceLibraryCode\include_juce_audio_formats.cpp"/>
 | 
			
		||||
    <ClCompile Include="..\..\JuceLibraryCode\include_juce_audio_processors.cpp"/>
 | 
			
		||||
    <ClCompile Include="..\..\JuceLibraryCode\include_juce_audio_processors.cpp">
 | 
			
		||||
      <AdditionalOptions> /bigobj %(AdditionalOptions)</AdditionalOptions>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\JuceLibraryCode\include_juce_audio_processors_ara.cpp"/>
 | 
			
		||||
    <ClCompile Include="..\..\JuceLibraryCode\include_juce_audio_processors_lv2_libs.cpp"/>
 | 
			
		||||
    <ClCompile Include="..\..\JuceLibraryCode\include_juce_audio_utils.cpp"/>
 | 
			
		||||
    <ClCompile Include="..\..\JuceLibraryCode\include_juce_box2d.cpp"/>
 | 
			
		||||
    <ClCompile Include="..\..\JuceLibraryCode\include_juce_core.cpp"/>
 | 
			
		||||
@@ -2522,6 +2717,7 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEValue.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEZoneLayout.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\native\juce_mac_CoreAudioLayouts.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\native\juce_mac_CoreAudioTimeConversions.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\sources\juce_AudioSource.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\sources\juce_BufferingAudioSource.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\sources\juce_ChannelRemappingAudioSource.h"/>
 | 
			
		||||
@@ -2710,6 +2906,7 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\juce_OggVorbisAudioFormat.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\juce_WavAudioFormat.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\juce_WindowsMediaAudioFormat.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\format\juce_ARAAudioReaders.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\format\juce_AudioFormat.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\format\juce_AudioFormatManager.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\format\juce_AudioFormatReader.h"/>
 | 
			
		||||
@@ -2722,6 +2919,76 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\juce_audio_formats.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format\juce_AudioPluginFormat.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format\juce_AudioPluginFormatManager.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\lilv\lilv.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\lilv\lilvmm.hpp"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\zix\common.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\zix\tree.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\filesystem.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\lilv_internal.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\atom\atom.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\atom\forge.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\atom\util.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\buf-size\buf-size.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\core\attributes.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\core\lv2.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\core\lv2_util.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\data-access\data-access.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\dynmanifest\dynmanifest.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\event\event-helpers.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\event\event.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\instance-access\instance-access.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\log\log.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\log\logger.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\midi\midi.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\morph\morph.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\options\options.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\parameters\parameters.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\patch\patch.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\port-groups\port-groups.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\port-props\port-props.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\presets\presets.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\resize-port\resize-port.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\state\state.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\time\time.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\ui\ui.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\units\units.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\uri-map\uri-map.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\urid\urid.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\worker\worker.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\serd\serd.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\attributes.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\base64.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\byte_sink.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\byte_source.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\node.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\reader.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\serd_config.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\serd_internal.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\stack.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\string_utils.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\system.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\uri_utils.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord\sord\sord.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord\sord\sordmm.hpp"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord\src\zix\btree.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord\src\zix\common.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord\src\zix\digest.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord\src\zix\hash.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord\src\sord_config.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord\src\sord_internal.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sratom\sratom\sratom.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\juce_lv2_config.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv_config.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd_config.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord_config.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\pslextensions\ipslcontextinfo.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\pslextensions\ipsleditcontroller.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\pslextensions\ipslgainreduction.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\pslextensions\ipslhostcommands.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\pslextensions\ipslviewembedding.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\pslextensions\ipslviewscaling.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\pslextensions\pslauextensions.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\pslextensions\pslvst2extensions.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\VST3_SDK\base\source\classfactoryhelpers.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\VST3_SDK\base\source\fbuffer.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\VST3_SDK\base\source\fdebug.h"/>
 | 
			
		||||
@@ -2787,9 +3054,14 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\VST3_SDK\public.sdk\source\vst\vsteditcontroller.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\VST3_SDK\public.sdk\source\vst\vstparameters.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\VST3_SDK\public.sdk\source\vst\vstpresetfile.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_ARACommon.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_ARAHosting.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_AU_Shared.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_AudioUnitPluginFormat.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_LADSPAPluginFormat.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_LV2Common.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_LV2PluginFormat.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_LV2Resources.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_VST3Common.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_VST3Headers.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_VST3PluginFormat.h"/>
 | 
			
		||||
@@ -2805,10 +3077,17 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\processors\juce_AudioProcessorParameter.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\processors\juce_AudioProcessorParameterGroup.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\processors\juce_GenericAudioProcessorEditor.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\processors\juce_HostedAudioProcessorParameter.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\processors\juce_PluginDescription.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\scanning\juce_KnownPluginList.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\scanning\juce_PluginDirectoryScanner.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\scanning\juce_PluginListComponent.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\ARA\juce_ARA_utils.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\ARA\juce_ARADebug.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\ARA\juce_ARADocumentController.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\ARA\juce_ARAModelObjects.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\ARA\juce_ARAPlugInInstanceRoles.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\ARA\juce_AudioProcessor_ARAExtensions.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_AudioParameterBool.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_AudioParameterChoice.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_AudioParameterFloat.h"/>
 | 
			
		||||
@@ -2816,6 +3095,8 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_AudioProcessorParameterWithID.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_AudioProcessorValueTreeState.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_ExtensionsVisitor.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_FlagCache.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_NativeScaleFactorNotifier.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_ParameterAttachments.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_PluginHostType.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_RangedAudioParameter.h"/>
 | 
			
		||||
@@ -2831,7 +3112,9 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_utils\gui\juce_AudioThumbnailCache.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_utils\gui\juce_AudioVisualiserComponent.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_utils\gui\juce_BluetoothMidiDevicePairingDialogue.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_utils\gui\juce_KeyboardComponentBase.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_utils\gui\juce_MidiKeyboardComponent.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_utils\gui\juce_MPEKeyboardComponent.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_utils\players\juce_AudioProcessorPlayer.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_utils\players\juce_SoundPlayer.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_utils\juce_audio_utils.h"/>
 | 
			
		||||
@@ -2893,13 +3176,17 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_LinkedListPointer.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_ListenerList.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_NamedValueSet.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_Optional.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_OwnedArray.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_PropertySet.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_ReferenceCountedArray.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_ScopedValueSetter.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_SingleThreadedAbstractFifo.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_SortedSet.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_SparseSet.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_Variant.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\files\juce_AndroidDocument.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\files\juce_common_MimeTypes.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\files\juce_DirectoryIterator.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\files\juce_File.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\files\juce_FileFilter.h"/>
 | 
			
		||||
@@ -2932,6 +3219,7 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_MemoryBlock.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_OptionalScopedPointer.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_ReferenceCountedObject.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_Reservoir.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_ScopedPointer.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_SharedResourcePointer.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_Singleton.h"/>
 | 
			
		||||
@@ -2956,6 +3244,7 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\network\juce_Socket.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\network\juce_URL.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\network\juce_WebInputStream.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\streams\juce_AndroidDocumentInputSource.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\streams\juce_BufferedInputStream.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\streams\juce_FileInputSource.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\streams\juce_InputSource.h"/>
 | 
			
		||||
@@ -3038,8 +3327,8 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_data_structures\values\juce_CachedValue.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_data_structures\values\juce_Value.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_data_structures\values\juce_ValueTree.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_data_structures\values\juce_ValueTreePropertyWithDefault.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_data_structures\values\juce_ValueTreeSynchroniser.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_data_structures\values\juce_ValueWithDefault.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_data_structures\juce_data_structures.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_AudioBlock.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_FixedSizeFunction.h"/>
 | 
			
		||||
@@ -3107,6 +3396,7 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_events\messages\juce_MountedVolumeListChangeDetector.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_events\messages\juce_NotificationType.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_events\native\juce_linux_EventLoop.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_events\native\juce_linux_EventLoopInternal.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_events\native\juce_osx_MessageQueue.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_events\native\juce_ScopedLowPowerModeDisabler.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_events\native\juce_win32_HiddenMessageWindow.h"/>
 | 
			
		||||
@@ -3166,6 +3456,7 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_graphics\images\juce_ImageCache.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_graphics\images\juce_ImageConvolutionKernel.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_graphics\images\juce_ImageFileFormat.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_graphics\images\juce_ScaledImage.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_graphics\native\juce_mac_CoreGraphicsContext.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_graphics\native\juce_mac_CoreGraphicsHelpers.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_graphics\native\juce_RenderingHelpers.h"/>
 | 
			
		||||
@@ -3268,6 +3559,7 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\menus\juce_PopupMenu.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\misc\juce_BubbleComponent.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\misc\juce_DropShadower.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\misc\juce_FocusOutline.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\misc\juce_JUCESplashScreen.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_ComponentDragger.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_DragAndDropContainer.h"/>
 | 
			
		||||
@@ -3279,11 +3571,13 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_MouseInactivityDetector.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_MouseInputSource.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_MouseListener.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_PointerState.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_SelectedItemSet.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_TextDragAndDropTarget.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_TooltipClient.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\native\accessibility\juce_AccessibilityTextHelpers.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\native\accessibility\juce_win32_AccessibilityElement.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\native\accessibility\juce_win32_ComInterfaces.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\native\accessibility\juce_win32_UIAExpandCollapseProvider.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\native\accessibility\juce_win32_UIAGridItemProvider.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\native\accessibility\juce_win32_UIAGridProvider.h"/>
 | 
			
		||||
@@ -3301,7 +3595,9 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\native\accessibility\juce_win32_WindowsUIAWrapper.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\native\x11\juce_linux_X11_Symbols.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\native\x11\juce_linux_XWindowSystem.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\native\juce_mac_CGMetalLayerRenderer.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\native\juce_MultiTouchMapper.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\native\juce_ScopedDPIAwarenessDisabler.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\native\juce_win32_ScopedThreadDPIAwarenessSetter.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\positioning\juce_MarkerList.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\positioning\juce_RelativeCoordinate.h"/>
 | 
			
		||||
@@ -3356,7 +3652,6 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\embedding\juce_AndroidViewComponent.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\embedding\juce_HWNDComponent.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\embedding\juce_NSViewComponent.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\embedding\juce_ScopedDPIAwarenessDisabler.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\embedding\juce_UIViewComponent.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\embedding\juce_XEmbedComponent.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\misc\juce_AnimatedAppComponent.h"/>
 | 
			
		||||
@@ -3371,7 +3666,7 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\misc\juce_SplashScreen.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\misc\juce_SystemTrayIconComponent.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\misc\juce_WebBrowserComponent.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\native\juce_mac_CarbonViewWrapperComponent.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\native\juce_mac_NSViewFrameWatcher.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\juce_gui_extra.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_opengl\geometry\juce_Draggable3DOrientation.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_opengl\geometry\juce_Matrix3D.h"/>
 | 
			
		||||
@@ -3420,6 +3715,7 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_mac_CameraDevice.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_mac_Video.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_win32_CameraDevice.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_win32_ComTypes.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_win32_Video.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_video\playback\juce_VideoComponent.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_video\juce_video.h"/>
 | 
			
		||||
@@ -3432,6 +3728,7 @@
 | 
			
		||||
    <None Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\Flac Licence.txt"/>
 | 
			
		||||
    <None Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.7\README.md"/>
 | 
			
		||||
    <None Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\Ogg Vorbis Licence.txt"/>
 | 
			
		||||
    <None Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\README.md"/>
 | 
			
		||||
    <None Include="..\..\..\..\modules\juce_audio_processors\format_types\VST3_SDK\base\LICENSE.txt"/>
 | 
			
		||||
    <None Include="..\..\..\..\modules\juce_audio_processors\format_types\VST3_SDK\base\README.md"/>
 | 
			
		||||
    <None Include="..\..\..\..\modules\juce_audio_processors\format_types\VST3_SDK\pluginterfaces\LICENSE.txt"/>
 | 
			
		||||
 
 | 
			
		||||
@@ -155,6 +155,132 @@
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format">
 | 
			
		||||
      <UniqueIdentifier>{86737735-F6BA-F64A-5EC7-5C9F36755F79}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lilv\lilv">
 | 
			
		||||
      <UniqueIdentifier>{CDCCDBC1-E1A7-558D-D4AA-B48003178AE3}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\zix">
 | 
			
		||||
      <UniqueIdentifier>{6656EC0E-A4C5-985B-242F-01890BDEFB1B}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lilv\src">
 | 
			
		||||
      <UniqueIdentifier>{107F6637-689A-6DAC-1F5D-FD9734F3A0D9}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lilv">
 | 
			
		||||
      <UniqueIdentifier>{C60CB2F9-12ED-74A2-C81C-366287805252}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\atom">
 | 
			
		||||
      <UniqueIdentifier>{0BE3157E-54F5-3F72-7023-A62A81D83443}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\buf-size">
 | 
			
		||||
      <UniqueIdentifier>{AD43AFB9-8A3D-C470-E098-4ADA2D6B1C07}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\core">
 | 
			
		||||
      <UniqueIdentifier>{77E6DFCD-32E7-A7E2-75E9-50C49384FEDA}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\data-access">
 | 
			
		||||
      <UniqueIdentifier>{8449F5A3-222A-3C21-88BD-2ACA69CD290A}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\dynmanifest">
 | 
			
		||||
      <UniqueIdentifier>{50066622-9190-C54D-FE24-563064A80DB4}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\event">
 | 
			
		||||
      <UniqueIdentifier>{E8F398A4-2CFC-D98B-343B-FB06B6B54063}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\instance-access">
 | 
			
		||||
      <UniqueIdentifier>{18BD9026-D673-60FB-C5C0-E4234E9FE71C}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\log">
 | 
			
		||||
      <UniqueIdentifier>{E469C933-C0FE-3A95-168B-234F8B4B620B}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\midi">
 | 
			
		||||
      <UniqueIdentifier>{375C3EDB-D1F5-AA38-D498-B462B7BDEDE9}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\morph">
 | 
			
		||||
      <UniqueIdentifier>{2E0391E6-2B82-F704-4B16-9EF63C4E25C1}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\options">
 | 
			
		||||
      <UniqueIdentifier>{D1C825D2-2980-075A-3EC0-43930977748F}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\parameters">
 | 
			
		||||
      <UniqueIdentifier>{B350BD14-1FB6-A9A0-4725-75CFEFC2D067}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\patch">
 | 
			
		||||
      <UniqueIdentifier>{96D16B7E-5FC5-182E-8734-37C9D27C2299}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\port-groups">
 | 
			
		||||
      <UniqueIdentifier>{56518C02-F710-7D5E-09E6-4B152D5900C7}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\port-props">
 | 
			
		||||
      <UniqueIdentifier>{8D78CFF1-6E9E-3E78-317D-7954EE6482BB}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\presets">
 | 
			
		||||
      <UniqueIdentifier>{6B811726-62F3-6E7C-BE8E-493A61CAA9E4}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\resize-port">
 | 
			
		||||
      <UniqueIdentifier>{C84EE2C8-14A3-D098-62A4-E1C75B7FA13A}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\state">
 | 
			
		||||
      <UniqueIdentifier>{42DD7AA9-DF7D-D9F9-E50C-69C44211A42B}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\time">
 | 
			
		||||
      <UniqueIdentifier>{009A44FF-D1C5-47C0-64CC-9122107C73D1}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\ui">
 | 
			
		||||
      <UniqueIdentifier>{AAEE24C0-066F-8593-70EA-B7AC7553E885}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\units">
 | 
			
		||||
      <UniqueIdentifier>{CEC45021-32A4-16BA-8E12-023B029608CD}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\uri-map">
 | 
			
		||||
      <UniqueIdentifier>{E5DFE07F-5901-AF5C-7759-84EBF9717E5E}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\urid">
 | 
			
		||||
      <UniqueIdentifier>{3A189BF7-28D6-C0C4-B831-97AD9E46FE5A}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\worker">
 | 
			
		||||
      <UniqueIdentifier>{829FC6C3-87E7-0491-B8C3-DC3905FB6039}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2">
 | 
			
		||||
      <UniqueIdentifier>{49174595-84D0-A512-B98C-0CFD2D772B8A}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2">
 | 
			
		||||
      <UniqueIdentifier>{E27C67CB-E138-DCCB-110D-623E2C01F9BC}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\serd\serd">
 | 
			
		||||
      <UniqueIdentifier>{392635C4-010A-C8A2-F46D-1A3628445E1C}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\serd\src">
 | 
			
		||||
      <UniqueIdentifier>{1FF26A52-F9B9-625F-DEE9-8FEE0C02F0F4}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\serd">
 | 
			
		||||
      <UniqueIdentifier>{3A5A13A1-B57C-EF05-AC38-53B08A4C8D4A}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\sord\sord">
 | 
			
		||||
      <UniqueIdentifier>{97983FD5-3F19-2B58-4941-D8FBB6B92BA4}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\sord\src\zix">
 | 
			
		||||
      <UniqueIdentifier>{ADC9725E-0948-5908-13BD-0275DB25325A}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\sord\src">
 | 
			
		||||
      <UniqueIdentifier>{37AD6CD9-9FE5-A457-B1FE-36A85F973502}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\sord">
 | 
			
		||||
      <UniqueIdentifier>{0F3B119C-FE8B-3978-2D80-53248BBBCDEA}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\sratom\sratom">
 | 
			
		||||
      <UniqueIdentifier>{5E836BFC-319A-1CE7-13C9-BD9E87F0A228}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\sratom\src">
 | 
			
		||||
      <UniqueIdentifier>{5D8E291B-1BB8-3A55-0939-D13A8589C395}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\sratom">
 | 
			
		||||
      <UniqueIdentifier>{BE3B7D89-2DE8-3CA1-B00E-55821EF3AAAC}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK">
 | 
			
		||||
      <UniqueIdentifier>{E0DE9D5D-2792-148A-2CE1-182A90DD5F0E}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\pslextensions">
 | 
			
		||||
      <UniqueIdentifier>{DC27B453-334E-6965-BAD5-7F88C3E5BA46}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\VST3_SDK\base\source">
 | 
			
		||||
      <UniqueIdentifier>{4DC60E78-BBC0-B540-63A2-37E14ABBEF09}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
@@ -209,6 +335,9 @@
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\scanning">
 | 
			
		||||
      <UniqueIdentifier>{D0584AC3-6837-14F6-90BF-5EA604D1F074}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\utilities\ARA">
 | 
			
		||||
      <UniqueIdentifier>{3CB9AC9F-1F99-25B3-8DC1-7DBB67D2E20C}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\utilities">
 | 
			
		||||
      <UniqueIdentifier>{794B64EC-B809-32E3-AD00-4EE6A74802CA}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
@@ -604,15 +733,15 @@
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\buffers\juce_FloatVectorOperations.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_basics\buffers</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\midi\ump\juce_UMP_test.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_basics\midi\ump</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\midi\ump\juce_UMPMidi1ToMidi2DefaultTranslator.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_basics\midi\ump</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\midi\ump\juce_UMPSysEx7.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_basics\midi\ump</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\midi\ump\juce_UMPTests.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_basics\midi\ump</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\midi\ump\juce_UMPUtils.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_basics\midi\ump</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
@@ -724,8 +853,8 @@
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_devices\audio_io\juce_AudioIODeviceType.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_devices\audio_io</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_devices\midi_io\ump\juce_UMPTests.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_devices\midi_io\ump</Filter>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_devices\audio_io\juce_SampleRateHelpers.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_devices\audio_io</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_devices\midi_io\juce_MidiDevices.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_devices\midi_io</Filter>
 | 
			
		||||
@@ -1099,6 +1228,9 @@
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\juce_WindowsMediaAudioFormat.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_formats\codecs</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\format\juce_ARAAudioReaders.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_formats\format</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\format\juce_AudioFormat.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_formats\format</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
@@ -1135,6 +1267,123 @@
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format\juce_AudioPluginFormatManager.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\zix\tree.c">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\zix</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\collections.c">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lilv\src</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\filesystem.c">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lilv\src</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\instance.c">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lilv\src</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\lib.c">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lilv\src</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\node.c">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lilv\src</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\plugin.c">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lilv\src</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\pluginclass.c">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lilv\src</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\port.c">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lilv\src</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\query.c">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lilv\src</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\scalepoint.c">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lilv\src</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\state.c">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lilv\src</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\ui.c">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lilv\src</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\util.c">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lilv\src</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\world.c">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lilv\src</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\atom\atom-test-utils.c">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\atom</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\atom\atom-test.c">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\atom</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\atom\forge-overflow-test.c">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\atom</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\base64.c">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\serd\src</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\byte_source.c">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\serd\src</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\env.c">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\serd\src</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\n3.c">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\serd\src</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\node.c">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\serd\src</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\reader.c">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\serd\src</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\serdi.c">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\serd\src</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\string.c">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\serd\src</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\system.c">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\serd\src</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\uri.c">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\serd\src</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\writer.c">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\serd\src</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord\src\zix\btree.c">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\sord\src\zix</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord\src\zix\digest.c">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\sord\src\zix</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord\src\zix\hash.c">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\sord\src\zix</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord\src\sord.c">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\sord\src</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord\src\sord_test.c">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\sord\src</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord\src\sord_validate.c">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\sord\src</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord\src\sordi.c">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\sord\src</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord\src\sordmm_test.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\sord\src</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord\src\syntax.c">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\sord\src</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sratom\src\sratom.c">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\sratom\src</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\VST3_SDK\base\source\baseiids.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\VST3_SDK\base\source</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
@@ -1204,6 +1453,12 @@
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\VST3_SDK\public.sdk\source\vst\vstpresetfile.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\VST3_SDK\public.sdk\source\vst</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_ARACommon.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_ARAHosting.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_AudioUnitPluginFormat.mm">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
@@ -1213,9 +1468,21 @@
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_LegacyAudioParameter.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_LV2PluginFormat.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_LV2PluginFormat_test.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_LV2SupportLibs.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_VST3PluginFormat.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_VST3PluginFormat_test.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_VSTPluginFormat.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
@@ -1249,6 +1516,24 @@
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\scanning\juce_PluginListComponent.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\scanning</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\utilities\ARA\juce_ARA_utils.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\utilities\ARA</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\utilities\ARA\juce_ARADocumentController.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\utilities\ARA</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\utilities\ARA\juce_ARADocumentControllerCommon.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\utilities\ARA</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\utilities\ARA\juce_ARAModelObjects.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\utilities\ARA</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\utilities\ARA\juce_ARAPlugInInstanceRoles.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\utilities\ARA</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\utilities\ARA\juce_AudioProcessor_ARAExtensions.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\utilities\ARA</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_AudioParameterBool.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\utilities</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
@@ -1267,6 +1552,9 @@
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_AudioProcessorValueTreeState.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\utilities</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_NativeScaleFactorNotifier.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\utilities</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_ParameterAttachments.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\utilities</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
@@ -1282,6 +1570,12 @@
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\juce_audio_processors.mm">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\juce_audio_processors_ara.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\juce_audio_processors_lv2_libs.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_utils\audio_cd\juce_AudioCDReader.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_utils\audio_cd</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
@@ -1300,9 +1594,15 @@
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_utils\gui\juce_AudioVisualiserComponent.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_utils\gui</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_utils\gui\juce_KeyboardComponentBase.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_utils\gui</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_utils\gui\juce_MidiKeyboardComponent.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_utils\gui</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_utils\gui\juce_MPEKeyboardComponent.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_utils\gui</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_utils\native\juce_android_BluetoothMidiDevicePairingDialogue.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_utils\native</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
@@ -1498,9 +1798,15 @@
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_HashMap_test.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_core\containers</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_ListenerList.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_core\containers</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_NamedValueSet.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_core\containers</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_Optional_test.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_core\containers</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_OwnedArray.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_core\containers</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
@@ -1516,6 +1822,9 @@
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_Variant.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_core\containers</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_core\files\juce_common_MimeTypes.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_core\files</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_core\files\juce_DirectoryIterator.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_core\files</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
@@ -1582,6 +1891,9 @@
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_core\misc\juce_Uuid.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_core\misc</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_android_AndroidDocument.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_core\native</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_android_Files.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_core\native</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
@@ -1858,10 +2170,10 @@
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_data_structures\values\juce_ValueTree.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_data_structures\values</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_data_structures\values\juce_ValueTreeSynchroniser.cpp">
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_data_structures\values\juce_ValueTreePropertyWithDefault_test.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_data_structures\values</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_data_structures\values\juce_ValueWithDefault.cpp">
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_data_structures\values\juce_ValueTreeSynchroniser.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_data_structures\values</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_data_structures\juce_data_structures.cpp">
 | 
			
		||||
@@ -2107,6 +2419,9 @@
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_graphics\geometry\juce_PathStrokeType.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_graphics\geometry</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_graphics\geometry\juce_Rectangle_test.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_graphics\geometry</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jcapimin.c">
 | 
			
		||||
      <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
@@ -2593,6 +2908,9 @@
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\misc\juce_DropShadower.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_gui_basics\misc</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\misc\juce_FocusOutline.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_gui_basics\misc</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\misc\juce_JUCESplashScreen.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_gui_basics\misc</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
@@ -2617,6 +2935,9 @@
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_MouseListener.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_gui_basics\mouse</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\accessibility\juce_AccessibilityTextHelpers_test.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_gui_basics\native\accessibility</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\accessibility\juce_android_Accessibility.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_gui_basics\native\accessibility</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
@@ -2653,9 +2974,6 @@
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\juce_android_Windowing.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_gui_basics\native</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\juce_common_MimeTypes.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_gui_basics\native</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\juce_ios_ContentSharer.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_gui_basics\native</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
@@ -3037,6 +3355,12 @@
 | 
			
		||||
    <ClCompile Include="..\..\JuceLibraryCode\include_juce_audio_processors.cpp">
 | 
			
		||||
      <Filter>JUCE Library Code</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\JuceLibraryCode\include_juce_audio_processors_ara.cpp">
 | 
			
		||||
      <Filter>JUCE Library Code</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\JuceLibraryCode\include_juce_audio_processors_lv2_libs.cpp">
 | 
			
		||||
      <Filter>JUCE Library Code</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\JuceLibraryCode\include_juce_audio_utils.cpp">
 | 
			
		||||
      <Filter>JUCE Library Code</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
@@ -3225,6 +3549,9 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\native\juce_mac_CoreAudioLayouts.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_basics\native</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\native\juce_mac_CoreAudioTimeConversions.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_basics\native</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\sources\juce_AudioSource.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_basics\sources</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
@@ -3789,6 +4116,9 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\juce_WindowsMediaAudioFormat.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_formats\codecs</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\format\juce_ARAAudioReaders.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_formats\format</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\format\juce_AudioFormat.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_formats\format</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
@@ -3825,6 +4155,216 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format\juce_AudioPluginFormatManager.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\lilv\lilv.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lilv\lilv</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\lilv\lilvmm.hpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lilv\lilv</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\zix\common.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\zix</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\zix\tree.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\zix</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\filesystem.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lilv\src</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\lilv_internal.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lilv\src</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\atom\atom.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\atom</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\atom\forge.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\atom</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\atom\util.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\atom</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\buf-size\buf-size.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\buf-size</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\core\attributes.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\core</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\core\lv2.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\core</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\core\lv2_util.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\core</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\data-access\data-access.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\data-access</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\dynmanifest\dynmanifest.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\dynmanifest</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\event\event-helpers.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\event</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\event\event.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\event</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\instance-access\instance-access.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\instance-access</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\log\log.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\log</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\log\logger.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\log</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\midi\midi.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\midi</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\morph\morph.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\morph</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\options\options.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\options</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\parameters\parameters.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\parameters</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\patch\patch.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\patch</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\port-groups\port-groups.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\port-groups</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\port-props\port-props.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\port-props</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\presets\presets.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\presets</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\resize-port\resize-port.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\resize-port</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\state\state.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\state</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\time\time.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\time</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\ui\ui.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\ui</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\units\units.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\units</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\uri-map\uri-map.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\uri-map</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\urid\urid.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\urid</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\worker\worker.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\worker</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\serd\serd.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\serd\serd</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\attributes.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\serd\src</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\base64.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\serd\src</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\byte_sink.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\serd\src</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\byte_source.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\serd\src</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\node.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\serd\src</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\reader.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\serd\src</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\serd_config.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\serd\src</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\serd_internal.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\serd\src</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\stack.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\serd\src</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\string_utils.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\serd\src</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\system.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\serd\src</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\uri_utils.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\serd\src</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord\sord\sord.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\sord\sord</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord\sord\sordmm.hpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\sord\sord</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord\src\zix\btree.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\sord\src\zix</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord\src\zix\common.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\sord\src\zix</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord\src\zix\digest.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\sord\src\zix</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord\src\zix\hash.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\sord\src\zix</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord\src\sord_config.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\sord\src</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord\src\sord_internal.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\sord\src</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sratom\sratom\sratom.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\sratom\sratom</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\juce_lv2_config.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv_config.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd_config.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord_config.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\pslextensions\ipslcontextinfo.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\pslextensions</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\pslextensions\ipsleditcontroller.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\pslextensions</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\pslextensions\ipslgainreduction.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\pslextensions</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\pslextensions\ipslhostcommands.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\pslextensions</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\pslextensions\ipslviewembedding.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\pslextensions</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\pslextensions\ipslviewscaling.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\pslextensions</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\pslextensions\pslauextensions.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\pslextensions</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\pslextensions\pslvst2extensions.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\pslextensions</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\VST3_SDK\base\source\classfactoryhelpers.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\VST3_SDK\base\source</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
@@ -4020,6 +4560,12 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\VST3_SDK\public.sdk\source\vst\vstpresetfile.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\VST3_SDK\public.sdk\source\vst</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_ARACommon.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_ARAHosting.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_AU_Shared.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
@@ -4029,6 +4575,15 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_LADSPAPluginFormat.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_LV2Common.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_LV2PluginFormat.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_LV2Resources.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_VST3Common.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
@@ -4074,6 +4629,9 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\processors\juce_GenericAudioProcessorEditor.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\processors</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\processors\juce_HostedAudioProcessorParameter.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\processors</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\processors\juce_PluginDescription.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\processors</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
@@ -4086,6 +4644,24 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\scanning\juce_PluginListComponent.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\scanning</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\ARA\juce_ARA_utils.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\utilities\ARA</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\ARA\juce_ARADebug.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\utilities\ARA</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\ARA\juce_ARADocumentController.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\utilities\ARA</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\ARA\juce_ARAModelObjects.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\utilities\ARA</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\ARA\juce_ARAPlugInInstanceRoles.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\utilities\ARA</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\ARA\juce_AudioProcessor_ARAExtensions.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\utilities\ARA</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_AudioParameterBool.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\utilities</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
@@ -4107,6 +4683,12 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_ExtensionsVisitor.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\utilities</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_FlagCache.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\utilities</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_NativeScaleFactorNotifier.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\utilities</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_ParameterAttachments.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\utilities</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
@@ -4152,9 +4734,15 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_utils\gui\juce_BluetoothMidiDevicePairingDialogue.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_utils\gui</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_utils\gui\juce_KeyboardComponentBase.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_utils\gui</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_utils\gui\juce_MidiKeyboardComponent.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_utils\gui</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_utils\gui\juce_MPEKeyboardComponent.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_utils\gui</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_utils\players\juce_AudioProcessorPlayer.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_utils\players</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
@@ -4338,6 +4926,9 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_NamedValueSet.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_core\containers</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_Optional.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_core\containers</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_OwnedArray.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_core\containers</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
@@ -4350,6 +4941,9 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_ScopedValueSetter.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_core\containers</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_SingleThreadedAbstractFifo.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_core\containers</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_SortedSet.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_core\containers</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
@@ -4359,6 +4953,12 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_Variant.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_core\containers</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\files\juce_AndroidDocument.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_core\files</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\files\juce_common_MimeTypes.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_core\files</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\files\juce_DirectoryIterator.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_core\files</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
@@ -4455,6 +5055,9 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_ReferenceCountedObject.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_core\memory</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_Reservoir.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_core\memory</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_ScopedPointer.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_core\memory</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
@@ -4527,6 +5130,9 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\network\juce_WebInputStream.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_core\network</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\streams\juce_AndroidDocumentInputSource.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_core\streams</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\streams\juce_BufferedInputStream.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_core\streams</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
@@ -4773,10 +5379,10 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_data_structures\values\juce_ValueTree.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_data_structures\values</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_data_structures\values\juce_ValueTreeSynchroniser.h">
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_data_structures\values\juce_ValueTreePropertyWithDefault.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_data_structures\values</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_data_structures\values\juce_ValueWithDefault.h">
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_data_structures\values\juce_ValueTreeSynchroniser.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_data_structures\values</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_data_structures\juce_data_structures.h">
 | 
			
		||||
@@ -4980,6 +5586,9 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_events\native\juce_linux_EventLoop.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_events\native</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_events\native\juce_linux_EventLoopInternal.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_events\native</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_events\native\juce_osx_MessageQueue.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_events\native</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
@@ -5157,6 +5766,9 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_graphics\images\juce_ImageFileFormat.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_graphics\images</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_graphics\images\juce_ScaledImage.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_graphics\images</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_graphics\native\juce_mac_CoreGraphicsContext.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_graphics\native</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
@@ -5463,6 +6075,9 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\misc\juce_DropShadower.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_gui_basics\misc</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\misc\juce_FocusOutline.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_gui_basics\misc</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\misc\juce_JUCESplashScreen.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_gui_basics\misc</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
@@ -5496,6 +6111,9 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_MouseListener.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_gui_basics\mouse</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_PointerState.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_gui_basics\mouse</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_SelectedItemSet.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_gui_basics\mouse</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
@@ -5511,6 +6129,9 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\native\accessibility\juce_win32_AccessibilityElement.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_gui_basics\native\accessibility</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\native\accessibility\juce_win32_ComInterfaces.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_gui_basics\native\accessibility</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\native\accessibility\juce_win32_UIAExpandCollapseProvider.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_gui_basics\native\accessibility</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
@@ -5562,9 +6183,15 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\native\x11\juce_linux_XWindowSystem.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_gui_basics\native\x11</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\native\juce_mac_CGMetalLayerRenderer.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_gui_basics\native</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\native\juce_MultiTouchMapper.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_gui_basics\native</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\native\juce_ScopedDPIAwarenessDisabler.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_gui_basics\native</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\native\juce_win32_ScopedThreadDPIAwarenessSetter.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_gui_basics\native</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
@@ -5727,9 +6354,6 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\embedding\juce_NSViewComponent.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_gui_extra\embedding</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\embedding\juce_ScopedDPIAwarenessDisabler.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_gui_extra\embedding</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\embedding\juce_UIViewComponent.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_gui_extra\embedding</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
@@ -5772,7 +6396,7 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\misc\juce_WebBrowserComponent.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_gui_extra\misc</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\native\juce_mac_CarbonViewWrapperComponent.h">
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\native\juce_mac_NSViewFrameWatcher.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_gui_extra\native</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\juce_gui_extra.h">
 | 
			
		||||
@@ -5919,6 +6543,9 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_win32_CameraDevice.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_video\native</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_win32_ComTypes.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_video\native</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_win32_Video.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_video\native</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
@@ -5951,6 +6578,9 @@
 | 
			
		||||
    <None Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\Ogg Vorbis Licence.txt">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis</Filter>
 | 
			
		||||
    </None>
 | 
			
		||||
    <None Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\README.md">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK</Filter>
 | 
			
		||||
    </None>
 | 
			
		||||
    <None Include="..\..\..\..\modules\juce_audio_processors\format_types\VST3_SDK\base\LICENSE.txt">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\VST3_SDK\base</Filter>
 | 
			
		||||
    </None>
 | 
			
		||||
 
 | 
			
		||||
@@ -9,7 +9,7 @@
 | 
			
		||||
#include <windows.h>
 | 
			
		||||
 | 
			
		||||
VS_VERSION_INFO VERSIONINFO
 | 
			
		||||
FILEVERSION  6,1,2,0
 | 
			
		||||
FILEVERSION  7,0,2,0
 | 
			
		||||
BEGIN
 | 
			
		||||
  BLOCK "StringFileInfo"
 | 
			
		||||
  BEGIN
 | 
			
		||||
@@ -18,9 +18,9 @@ BEGIN
 | 
			
		||||
      VALUE "CompanyName",  "Raw Material Software Limited\0"
 | 
			
		||||
      VALUE "LegalCopyright",  "Copyright (c) 2020 - Raw Material Software Limited\0"
 | 
			
		||||
      VALUE "FileDescription",  "DemoRunner\0"
 | 
			
		||||
      VALUE "FileVersion",  "6.1.2\0"
 | 
			
		||||
      VALUE "FileVersion",  "7.0.2\0"
 | 
			
		||||
      VALUE "ProductName",  "DemoRunner\0"
 | 
			
		||||
      VALUE "ProductVersion",  "6.1.2\0"
 | 
			
		||||
      VALUE "ProductVersion",  "7.0.2\0"
 | 
			
		||||
    END
 | 
			
		||||
  END
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,5 +1,6 @@
 | 
			
		||||
Microsoft Visual Studio Solution File, Format Version 11.00
 | 
			
		||||
# Visual Studio 2019
 | 
			
		||||
 | 
			
		||||
Microsoft Visual Studio Solution File, Format Version 11.00
 | 
			
		||||
# Visual Studio Version 16
 | 
			
		||||
 | 
			
		||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DemoRunner - App", "DemoRunner_App.vcxproj", "{882FE2E3-F4EF-9825-1908-F6FEE5366B5C}"
 | 
			
		||||
EndProject
 | 
			
		||||
 
 | 
			
		||||
@@ -63,8 +63,8 @@
 | 
			
		||||
    <ClCompile>
 | 
			
		||||
      <Optimization>Disabled</Optimization>
 | 
			
		||||
      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
 | 
			
		||||
      <AdditionalIncludeDirectories>..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
 | 
			
		||||
      <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60102;JUCE_MODULE_AVAILABLE_juce_analytics=1;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_box2d=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_MODULE_AVAILABLE_juce_osc=1;JUCE_MODULE_AVAILABLE_juce_product_unlocking=1;JUCE_MODULE_AVAILABLE_juce_video=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_USE_MP3AUDIOFORMAT=1;JUCE_ALLOW_STATIC_NULL_VARIABLES=0;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_USE_CAMERA=1;JUCE_STANDALONE_APPLICATION=1;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2019_78A5026=1;JUCE_APP_VERSION=6.1.2;JUCE_APP_VERSION_HEX=0x60102;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
 | 
			
		||||
      <AdditionalIncludeDirectories>..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src;..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv;..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sratom;..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord\src;..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord;..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd;..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2;..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK;..\..\..\..\modules\juce_audio_processors\format_types\VST3_SDK;..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
 | 
			
		||||
      <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x70002;JUCE_MODULE_AVAILABLE_juce_analytics=1;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_box2d=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_MODULE_AVAILABLE_juce_osc=1;JUCE_MODULE_AVAILABLE_juce_product_unlocking=1;JUCE_MODULE_AVAILABLE_juce_video=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_USE_MP3AUDIOFORMAT=1;JUCE_PLUGINHOST_VST3=1;JUCE_PLUGINHOST_LV2=1;JUCE_ALLOW_STATIC_NULL_VARIABLES=0;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_USE_CAMERA=1;JUCE_STANDALONE_APPLICATION=1;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2019_78A5026=1;JUCE_APP_VERSION=7.0.2;JUCE_APP_VERSION_HEX=0x70002;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;JucePlugin_Build_LV2=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
 | 
			
		||||
      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
 | 
			
		||||
      <RuntimeTypeInfo>true</RuntimeTypeInfo>
 | 
			
		||||
      <PrecompiledHeader>NotUsing</PrecompiledHeader>
 | 
			
		||||
@@ -78,7 +78,8 @@
 | 
			
		||||
      <LanguageStandard>stdcpp14</LanguageStandard>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ResourceCompile>
 | 
			
		||||
      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
 | 
			
		||||
      <AdditionalIncludeDirectories>..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src;..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv;..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sratom;..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord\src;..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord;..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd;..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2;..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK;..\..\..\..\modules\juce_audio_processors\format_types\VST3_SDK;..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
 | 
			
		||||
      <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x70002;JUCE_MODULE_AVAILABLE_juce_analytics=1;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_box2d=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_MODULE_AVAILABLE_juce_osc=1;JUCE_MODULE_AVAILABLE_juce_product_unlocking=1;JUCE_MODULE_AVAILABLE_juce_video=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_USE_MP3AUDIOFORMAT=1;JUCE_PLUGINHOST_VST3=1;JUCE_PLUGINHOST_LV2=1;JUCE_ALLOW_STATIC_NULL_VARIABLES=0;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_USE_CAMERA=1;JUCE_STANDALONE_APPLICATION=1;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2019_78A5026=1;JUCE_APP_VERSION=7.0.2;JUCE_APP_VERSION_HEX=0x70002;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;JucePlugin_Build_LV2=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
 | 
			
		||||
    </ResourceCompile>
 | 
			
		||||
    <Link>
 | 
			
		||||
      <OutputFile>$(OutDir)\DemoRunner.exe</OutputFile>
 | 
			
		||||
@@ -105,8 +106,8 @@
 | 
			
		||||
    </Midl>
 | 
			
		||||
    <ClCompile>
 | 
			
		||||
      <Optimization>Full</Optimization>
 | 
			
		||||
      <AdditionalIncludeDirectories>..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
 | 
			
		||||
      <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x60102;JUCE_MODULE_AVAILABLE_juce_analytics=1;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_box2d=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_MODULE_AVAILABLE_juce_osc=1;JUCE_MODULE_AVAILABLE_juce_product_unlocking=1;JUCE_MODULE_AVAILABLE_juce_video=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_USE_MP3AUDIOFORMAT=1;JUCE_ALLOW_STATIC_NULL_VARIABLES=0;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_USE_CAMERA=1;JUCE_STANDALONE_APPLICATION=1;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2019_78A5026=1;JUCE_APP_VERSION=6.1.2;JUCE_APP_VERSION_HEX=0x60102;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
 | 
			
		||||
      <AdditionalIncludeDirectories>..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src;..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv;..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sratom;..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord\src;..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord;..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd;..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2;..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK;..\..\..\..\modules\juce_audio_processors\format_types\VST3_SDK;..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
 | 
			
		||||
      <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x70002;JUCE_MODULE_AVAILABLE_juce_analytics=1;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_box2d=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_MODULE_AVAILABLE_juce_osc=1;JUCE_MODULE_AVAILABLE_juce_product_unlocking=1;JUCE_MODULE_AVAILABLE_juce_video=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_USE_MP3AUDIOFORMAT=1;JUCE_PLUGINHOST_VST3=1;JUCE_PLUGINHOST_LV2=1;JUCE_ALLOW_STATIC_NULL_VARIABLES=0;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_USE_CAMERA=1;JUCE_STANDALONE_APPLICATION=1;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2019_78A5026=1;JUCE_APP_VERSION=7.0.2;JUCE_APP_VERSION_HEX=0x70002;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;JucePlugin_Build_LV2=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
 | 
			
		||||
      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
 | 
			
		||||
      <RuntimeTypeInfo>true</RuntimeTypeInfo>
 | 
			
		||||
      <PrecompiledHeader>NotUsing</PrecompiledHeader>
 | 
			
		||||
@@ -120,7 +121,8 @@
 | 
			
		||||
      <LanguageStandard>stdcpp14</LanguageStandard>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ResourceCompile>
 | 
			
		||||
      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
 | 
			
		||||
      <AdditionalIncludeDirectories>..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src;..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv;..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sratom;..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord\src;..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord;..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd;..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2;..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK;..\..\..\..\modules\juce_audio_processors\format_types\VST3_SDK;..\..\JuceLibraryCode;..\..\..\..\modules;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
 | 
			
		||||
      <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCE_DISPLAY_SPLASH_SCREEN=0;JUCE_USE_DARK_SPLASH_SCREEN=1;JUCE_PROJUCER_VERSION=0x70002;JUCE_MODULE_AVAILABLE_juce_analytics=1;JUCE_MODULE_AVAILABLE_juce_audio_basics=1;JUCE_MODULE_AVAILABLE_juce_audio_devices=1;JUCE_MODULE_AVAILABLE_juce_audio_formats=1;JUCE_MODULE_AVAILABLE_juce_audio_processors=1;JUCE_MODULE_AVAILABLE_juce_audio_utils=1;JUCE_MODULE_AVAILABLE_juce_box2d=1;JUCE_MODULE_AVAILABLE_juce_core=1;JUCE_MODULE_AVAILABLE_juce_cryptography=1;JUCE_MODULE_AVAILABLE_juce_data_structures=1;JUCE_MODULE_AVAILABLE_juce_dsp=1;JUCE_MODULE_AVAILABLE_juce_events=1;JUCE_MODULE_AVAILABLE_juce_graphics=1;JUCE_MODULE_AVAILABLE_juce_gui_basics=1;JUCE_MODULE_AVAILABLE_juce_gui_extra=1;JUCE_MODULE_AVAILABLE_juce_opengl=1;JUCE_MODULE_AVAILABLE_juce_osc=1;JUCE_MODULE_AVAILABLE_juce_product_unlocking=1;JUCE_MODULE_AVAILABLE_juce_video=1;JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1;JUCE_USE_MP3AUDIOFORMAT=1;JUCE_PLUGINHOST_VST3=1;JUCE_PLUGINHOST_LV2=1;JUCE_ALLOW_STATIC_NULL_VARIABLES=0;JUCE_STRICT_REFCOUNTEDPOINTER=1;JUCE_USE_CAMERA=1;JUCE_STANDALONE_APPLICATION=1;JUCE_DEMO_RUNNER=1;JUCE_UNIT_TESTS=1;JUCER_VS2019_78A5026=1;JUCE_APP_VERSION=7.0.2;JUCE_APP_VERSION_HEX=0x70002;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;JucePlugin_Build_LV2=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
 | 
			
		||||
    </ResourceCompile>
 | 
			
		||||
    <Link>
 | 
			
		||||
      <OutputFile>$(OutDir)\DemoRunner.exe</OutputFile>
 | 
			
		||||
@@ -171,15 +173,15 @@
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\buffers\juce_FloatVectorOperations.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\midi\ump\juce_UMP_test.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\midi\ump\juce_UMPMidi1ToMidi2DefaultTranslator.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\midi\ump\juce_UMPSysEx7.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\midi\ump\juce_UMPTests.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\midi\ump\juce_UMPUtils.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
@@ -288,7 +290,7 @@
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_devices\audio_io\juce_AudioIODeviceType.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_devices\midi_io\ump\juce_UMPTests.cpp">
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_devices\audio_io\juce_SampleRateHelpers.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_devices\midi_io\juce_MidiDevices.cpp">
 | 
			
		||||
@@ -657,6 +659,9 @@
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\juce_WindowsMediaAudioFormat.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\format\juce_ARAAudioReaders.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\format\juce_AudioFormat.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
@@ -690,6 +695,123 @@
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format\juce_AudioPluginFormatManager.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\zix\tree.c">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\collections.c">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\filesystem.c">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\instance.c">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\lib.c">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\node.c">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\plugin.c">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\pluginclass.c">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\port.c">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\query.c">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\scalepoint.c">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\state.c">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\ui.c">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\util.c">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\world.c">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\atom\atom-test-utils.c">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\atom\atom-test.c">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\atom\forge-overflow-test.c">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\base64.c">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\byte_source.c">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\env.c">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\n3.c">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\node.c">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\reader.c">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\serdi.c">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\string.c">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\system.c">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\uri.c">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\writer.c">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord\src\zix\btree.c">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord\src\zix\digest.c">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord\src\zix\hash.c">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord\src\sord.c">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord\src\sord_test.c">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord\src\sord_validate.c">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord\src\sordi.c">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord\src\sordmm_test.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord\src\syntax.c">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sratom\src\sratom.c">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\VST3_SDK\base\source\baseiids.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
@@ -759,15 +881,33 @@
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\VST3_SDK\public.sdk\source\vst\vstpresetfile.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_ARACommon.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_ARAHosting.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_LADSPAPluginFormat.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_LegacyAudioParameter.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_LV2PluginFormat.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_LV2PluginFormat_test.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_LV2SupportLibs.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_VST3PluginFormat.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_VST3PluginFormat_test.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_VSTPluginFormat.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
@@ -801,6 +941,24 @@
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\scanning\juce_PluginListComponent.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\utilities\ARA\juce_ARA_utils.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\utilities\ARA\juce_ARADocumentController.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\utilities\ARA\juce_ARADocumentControllerCommon.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\utilities\ARA\juce_ARAModelObjects.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\utilities\ARA\juce_ARAPlugInInstanceRoles.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\utilities\ARA\juce_AudioProcessor_ARAExtensions.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_AudioParameterBool.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
@@ -819,6 +977,9 @@
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_AudioProcessorValueTreeState.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_NativeScaleFactorNotifier.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_ParameterAttachments.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
@@ -831,6 +992,12 @@
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\juce_audio_processors.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\juce_audio_processors_ara.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\juce_audio_processors_lv2_libs.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_utils\audio_cd\juce_AudioCDReader.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
@@ -849,9 +1016,15 @@
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_utils\gui\juce_AudioVisualiserComponent.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_utils\gui\juce_KeyboardComponentBase.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_utils\gui\juce_MidiKeyboardComponent.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_utils\gui\juce_MPEKeyboardComponent.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_utils\native\juce_android_BluetoothMidiDevicePairingDialogue.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
@@ -1032,9 +1205,15 @@
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_HashMap_test.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_ListenerList.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_NamedValueSet.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_Optional_test.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_OwnedArray.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
@@ -1050,6 +1229,9 @@
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_Variant.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_core\files\juce_common_MimeTypes.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_core\files\juce_DirectoryIterator.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
@@ -1116,6 +1298,9 @@
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_core\misc\juce_Uuid.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_android_AndroidDocument.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_android_Files.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
@@ -1371,10 +1556,10 @@
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_data_structures\values\juce_ValueTree.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_data_structures\values\juce_ValueTreeSynchroniser.cpp">
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_data_structures\values\juce_ValueTreePropertyWithDefault_test.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_data_structures\values\juce_ValueWithDefault.cpp">
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_data_structures\values\juce_ValueTreeSynchroniser.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_data_structures\juce_data_structures.cpp">
 | 
			
		||||
@@ -1605,6 +1790,9 @@
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_graphics\geometry\juce_PathStrokeType.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_graphics\geometry\juce_Rectangle_test.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jcapimin.c">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
@@ -2082,6 +2270,9 @@
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\misc\juce_DropShadower.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\misc\juce_FocusOutline.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\misc\juce_JUCESplashScreen.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
@@ -2106,6 +2297,9 @@
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_MouseListener.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\accessibility\juce_AccessibilityTextHelpers_test.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\accessibility\juce_android_Accessibility.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
@@ -2133,9 +2327,6 @@
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\juce_android_Windowing.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\juce_common_MimeTypes.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\juce_ios_ContentSharer.cpp">
 | 
			
		||||
      <ExcludedFromBuild>true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
@@ -2455,7 +2646,11 @@
 | 
			
		||||
    <ClCompile Include="..\..\JuceLibraryCode\include_juce_audio_basics.cpp"/>
 | 
			
		||||
    <ClCompile Include="..\..\JuceLibraryCode\include_juce_audio_devices.cpp"/>
 | 
			
		||||
    <ClCompile Include="..\..\JuceLibraryCode\include_juce_audio_formats.cpp"/>
 | 
			
		||||
    <ClCompile Include="..\..\JuceLibraryCode\include_juce_audio_processors.cpp"/>
 | 
			
		||||
    <ClCompile Include="..\..\JuceLibraryCode\include_juce_audio_processors.cpp">
 | 
			
		||||
      <AdditionalOptions> /bigobj %(AdditionalOptions)</AdditionalOptions>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\JuceLibraryCode\include_juce_audio_processors_ara.cpp"/>
 | 
			
		||||
    <ClCompile Include="..\..\JuceLibraryCode\include_juce_audio_processors_lv2_libs.cpp"/>
 | 
			
		||||
    <ClCompile Include="..\..\JuceLibraryCode\include_juce_audio_utils.cpp"/>
 | 
			
		||||
    <ClCompile Include="..\..\JuceLibraryCode\include_juce_box2d.cpp"/>
 | 
			
		||||
    <ClCompile Include="..\..\JuceLibraryCode\include_juce_core.cpp"/>
 | 
			
		||||
@@ -2522,6 +2717,7 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEValue.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\mpe\juce_MPEZoneLayout.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\native\juce_mac_CoreAudioLayouts.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\native\juce_mac_CoreAudioTimeConversions.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\sources\juce_AudioSource.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\sources\juce_BufferingAudioSource.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\sources\juce_ChannelRemappingAudioSource.h"/>
 | 
			
		||||
@@ -2710,6 +2906,7 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\juce_OggVorbisAudioFormat.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\juce_WavAudioFormat.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\juce_WindowsMediaAudioFormat.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\format\juce_ARAAudioReaders.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\format\juce_AudioFormat.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\format\juce_AudioFormatManager.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\format\juce_AudioFormatReader.h"/>
 | 
			
		||||
@@ -2722,6 +2919,76 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\juce_audio_formats.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format\juce_AudioPluginFormat.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format\juce_AudioPluginFormatManager.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\lilv\lilv.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\lilv\lilvmm.hpp"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\zix\common.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\zix\tree.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\filesystem.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\lilv_internal.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\atom\atom.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\atom\forge.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\atom\util.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\buf-size\buf-size.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\core\attributes.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\core\lv2.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\core\lv2_util.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\data-access\data-access.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\dynmanifest\dynmanifest.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\event\event-helpers.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\event\event.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\instance-access\instance-access.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\log\log.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\log\logger.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\midi\midi.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\morph\morph.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\options\options.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\parameters\parameters.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\patch\patch.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\port-groups\port-groups.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\port-props\port-props.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\presets\presets.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\resize-port\resize-port.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\state\state.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\time\time.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\ui\ui.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\units\units.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\uri-map\uri-map.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\urid\urid.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\worker\worker.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\serd\serd.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\attributes.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\base64.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\byte_sink.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\byte_source.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\node.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\reader.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\serd_config.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\serd_internal.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\stack.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\string_utils.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\system.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\uri_utils.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord\sord\sord.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord\sord\sordmm.hpp"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord\src\zix\btree.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord\src\zix\common.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord\src\zix\digest.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord\src\zix\hash.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord\src\sord_config.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord\src\sord_internal.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sratom\sratom\sratom.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\juce_lv2_config.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv_config.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd_config.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord_config.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\pslextensions\ipslcontextinfo.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\pslextensions\ipsleditcontroller.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\pslextensions\ipslgainreduction.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\pslextensions\ipslhostcommands.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\pslextensions\ipslviewembedding.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\pslextensions\ipslviewscaling.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\pslextensions\pslauextensions.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\pslextensions\pslvst2extensions.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\VST3_SDK\base\source\classfactoryhelpers.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\VST3_SDK\base\source\fbuffer.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\VST3_SDK\base\source\fdebug.h"/>
 | 
			
		||||
@@ -2787,9 +3054,14 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\VST3_SDK\public.sdk\source\vst\vsteditcontroller.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\VST3_SDK\public.sdk\source\vst\vstparameters.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\VST3_SDK\public.sdk\source\vst\vstpresetfile.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_ARACommon.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_ARAHosting.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_AU_Shared.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_AudioUnitPluginFormat.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_LADSPAPluginFormat.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_LV2Common.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_LV2PluginFormat.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_LV2Resources.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_VST3Common.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_VST3Headers.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_VST3PluginFormat.h"/>
 | 
			
		||||
@@ -2805,10 +3077,17 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\processors\juce_AudioProcessorParameter.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\processors\juce_AudioProcessorParameterGroup.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\processors\juce_GenericAudioProcessorEditor.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\processors\juce_HostedAudioProcessorParameter.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\processors\juce_PluginDescription.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\scanning\juce_KnownPluginList.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\scanning\juce_PluginDirectoryScanner.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\scanning\juce_PluginListComponent.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\ARA\juce_ARA_utils.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\ARA\juce_ARADebug.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\ARA\juce_ARADocumentController.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\ARA\juce_ARAModelObjects.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\ARA\juce_ARAPlugInInstanceRoles.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\ARA\juce_AudioProcessor_ARAExtensions.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_AudioParameterBool.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_AudioParameterChoice.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_AudioParameterFloat.h"/>
 | 
			
		||||
@@ -2816,6 +3095,8 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_AudioProcessorParameterWithID.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_AudioProcessorValueTreeState.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_ExtensionsVisitor.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_FlagCache.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_NativeScaleFactorNotifier.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_ParameterAttachments.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_PluginHostType.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_RangedAudioParameter.h"/>
 | 
			
		||||
@@ -2831,7 +3112,9 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_utils\gui\juce_AudioThumbnailCache.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_utils\gui\juce_AudioVisualiserComponent.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_utils\gui\juce_BluetoothMidiDevicePairingDialogue.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_utils\gui\juce_KeyboardComponentBase.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_utils\gui\juce_MidiKeyboardComponent.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_utils\gui\juce_MPEKeyboardComponent.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_utils\players\juce_AudioProcessorPlayer.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_utils\players\juce_SoundPlayer.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_utils\juce_audio_utils.h"/>
 | 
			
		||||
@@ -2893,13 +3176,17 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_LinkedListPointer.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_ListenerList.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_NamedValueSet.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_Optional.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_OwnedArray.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_PropertySet.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_ReferenceCountedArray.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_ScopedValueSetter.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_SingleThreadedAbstractFifo.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_SortedSet.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_SparseSet.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_Variant.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\files\juce_AndroidDocument.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\files\juce_common_MimeTypes.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\files\juce_DirectoryIterator.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\files\juce_File.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\files\juce_FileFilter.h"/>
 | 
			
		||||
@@ -2932,6 +3219,7 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_MemoryBlock.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_OptionalScopedPointer.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_ReferenceCountedObject.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_Reservoir.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_ScopedPointer.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_SharedResourcePointer.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_Singleton.h"/>
 | 
			
		||||
@@ -2956,6 +3244,7 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\network\juce_Socket.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\network\juce_URL.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\network\juce_WebInputStream.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\streams\juce_AndroidDocumentInputSource.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\streams\juce_BufferedInputStream.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\streams\juce_FileInputSource.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\streams\juce_InputSource.h"/>
 | 
			
		||||
@@ -3038,8 +3327,8 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_data_structures\values\juce_CachedValue.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_data_structures\values\juce_Value.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_data_structures\values\juce_ValueTree.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_data_structures\values\juce_ValueTreePropertyWithDefault.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_data_structures\values\juce_ValueTreeSynchroniser.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_data_structures\values\juce_ValueWithDefault.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_data_structures\juce_data_structures.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_AudioBlock.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_dsp\containers\juce_FixedSizeFunction.h"/>
 | 
			
		||||
@@ -3107,6 +3396,7 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_events\messages\juce_MountedVolumeListChangeDetector.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_events\messages\juce_NotificationType.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_events\native\juce_linux_EventLoop.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_events\native\juce_linux_EventLoopInternal.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_events\native\juce_osx_MessageQueue.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_events\native\juce_ScopedLowPowerModeDisabler.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_events\native\juce_win32_HiddenMessageWindow.h"/>
 | 
			
		||||
@@ -3166,6 +3456,7 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_graphics\images\juce_ImageCache.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_graphics\images\juce_ImageConvolutionKernel.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_graphics\images\juce_ImageFileFormat.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_graphics\images\juce_ScaledImage.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_graphics\native\juce_mac_CoreGraphicsContext.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_graphics\native\juce_mac_CoreGraphicsHelpers.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_graphics\native\juce_RenderingHelpers.h"/>
 | 
			
		||||
@@ -3268,6 +3559,7 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\menus\juce_PopupMenu.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\misc\juce_BubbleComponent.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\misc\juce_DropShadower.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\misc\juce_FocusOutline.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\misc\juce_JUCESplashScreen.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_ComponentDragger.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_DragAndDropContainer.h"/>
 | 
			
		||||
@@ -3279,11 +3571,13 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_MouseInactivityDetector.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_MouseInputSource.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_MouseListener.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_PointerState.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_SelectedItemSet.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_TextDragAndDropTarget.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_TooltipClient.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\native\accessibility\juce_AccessibilityTextHelpers.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\native\accessibility\juce_win32_AccessibilityElement.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\native\accessibility\juce_win32_ComInterfaces.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\native\accessibility\juce_win32_UIAExpandCollapseProvider.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\native\accessibility\juce_win32_UIAGridItemProvider.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\native\accessibility\juce_win32_UIAGridProvider.h"/>
 | 
			
		||||
@@ -3301,7 +3595,9 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\native\accessibility\juce_win32_WindowsUIAWrapper.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\native\x11\juce_linux_X11_Symbols.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\native\x11\juce_linux_XWindowSystem.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\native\juce_mac_CGMetalLayerRenderer.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\native\juce_MultiTouchMapper.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\native\juce_ScopedDPIAwarenessDisabler.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\native\juce_win32_ScopedThreadDPIAwarenessSetter.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\positioning\juce_MarkerList.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\positioning\juce_RelativeCoordinate.h"/>
 | 
			
		||||
@@ -3356,7 +3652,6 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\embedding\juce_AndroidViewComponent.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\embedding\juce_HWNDComponent.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\embedding\juce_NSViewComponent.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\embedding\juce_ScopedDPIAwarenessDisabler.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\embedding\juce_UIViewComponent.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\embedding\juce_XEmbedComponent.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\misc\juce_AnimatedAppComponent.h"/>
 | 
			
		||||
@@ -3371,7 +3666,7 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\misc\juce_SplashScreen.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\misc\juce_SystemTrayIconComponent.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\misc\juce_WebBrowserComponent.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\native\juce_mac_CarbonViewWrapperComponent.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\native\juce_mac_NSViewFrameWatcher.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\juce_gui_extra.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_opengl\geometry\juce_Draggable3DOrientation.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_opengl\geometry\juce_Matrix3D.h"/>
 | 
			
		||||
@@ -3420,6 +3715,7 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_mac_CameraDevice.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_mac_Video.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_win32_CameraDevice.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_win32_ComTypes.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_win32_Video.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_video\playback\juce_VideoComponent.h"/>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_video\juce_video.h"/>
 | 
			
		||||
@@ -3432,6 +3728,7 @@
 | 
			
		||||
    <None Include="..\..\..\..\modules\juce_audio_formats\codecs\flac\Flac Licence.txt"/>
 | 
			
		||||
    <None Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\libvorbis-1.3.7\README.md"/>
 | 
			
		||||
    <None Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\Ogg Vorbis Licence.txt"/>
 | 
			
		||||
    <None Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\README.md"/>
 | 
			
		||||
    <None Include="..\..\..\..\modules\juce_audio_processors\format_types\VST3_SDK\base\LICENSE.txt"/>
 | 
			
		||||
    <None Include="..\..\..\..\modules\juce_audio_processors\format_types\VST3_SDK\base\README.md"/>
 | 
			
		||||
    <None Include="..\..\..\..\modules\juce_audio_processors\format_types\VST3_SDK\pluginterfaces\LICENSE.txt"/>
 | 
			
		||||
 
 | 
			
		||||
@@ -155,6 +155,132 @@
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format">
 | 
			
		||||
      <UniqueIdentifier>{86737735-F6BA-F64A-5EC7-5C9F36755F79}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lilv\lilv">
 | 
			
		||||
      <UniqueIdentifier>{CDCCDBC1-E1A7-558D-D4AA-B48003178AE3}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\zix">
 | 
			
		||||
      <UniqueIdentifier>{6656EC0E-A4C5-985B-242F-01890BDEFB1B}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lilv\src">
 | 
			
		||||
      <UniqueIdentifier>{107F6637-689A-6DAC-1F5D-FD9734F3A0D9}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lilv">
 | 
			
		||||
      <UniqueIdentifier>{C60CB2F9-12ED-74A2-C81C-366287805252}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\atom">
 | 
			
		||||
      <UniqueIdentifier>{0BE3157E-54F5-3F72-7023-A62A81D83443}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\buf-size">
 | 
			
		||||
      <UniqueIdentifier>{AD43AFB9-8A3D-C470-E098-4ADA2D6B1C07}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\core">
 | 
			
		||||
      <UniqueIdentifier>{77E6DFCD-32E7-A7E2-75E9-50C49384FEDA}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\data-access">
 | 
			
		||||
      <UniqueIdentifier>{8449F5A3-222A-3C21-88BD-2ACA69CD290A}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\dynmanifest">
 | 
			
		||||
      <UniqueIdentifier>{50066622-9190-C54D-FE24-563064A80DB4}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\event">
 | 
			
		||||
      <UniqueIdentifier>{E8F398A4-2CFC-D98B-343B-FB06B6B54063}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\instance-access">
 | 
			
		||||
      <UniqueIdentifier>{18BD9026-D673-60FB-C5C0-E4234E9FE71C}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\log">
 | 
			
		||||
      <UniqueIdentifier>{E469C933-C0FE-3A95-168B-234F8B4B620B}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\midi">
 | 
			
		||||
      <UniqueIdentifier>{375C3EDB-D1F5-AA38-D498-B462B7BDEDE9}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\morph">
 | 
			
		||||
      <UniqueIdentifier>{2E0391E6-2B82-F704-4B16-9EF63C4E25C1}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\options">
 | 
			
		||||
      <UniqueIdentifier>{D1C825D2-2980-075A-3EC0-43930977748F}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\parameters">
 | 
			
		||||
      <UniqueIdentifier>{B350BD14-1FB6-A9A0-4725-75CFEFC2D067}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\patch">
 | 
			
		||||
      <UniqueIdentifier>{96D16B7E-5FC5-182E-8734-37C9D27C2299}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\port-groups">
 | 
			
		||||
      <UniqueIdentifier>{56518C02-F710-7D5E-09E6-4B152D5900C7}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\port-props">
 | 
			
		||||
      <UniqueIdentifier>{8D78CFF1-6E9E-3E78-317D-7954EE6482BB}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\presets">
 | 
			
		||||
      <UniqueIdentifier>{6B811726-62F3-6E7C-BE8E-493A61CAA9E4}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\resize-port">
 | 
			
		||||
      <UniqueIdentifier>{C84EE2C8-14A3-D098-62A4-E1C75B7FA13A}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\state">
 | 
			
		||||
      <UniqueIdentifier>{42DD7AA9-DF7D-D9F9-E50C-69C44211A42B}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\time">
 | 
			
		||||
      <UniqueIdentifier>{009A44FF-D1C5-47C0-64CC-9122107C73D1}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\ui">
 | 
			
		||||
      <UniqueIdentifier>{AAEE24C0-066F-8593-70EA-B7AC7553E885}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\units">
 | 
			
		||||
      <UniqueIdentifier>{CEC45021-32A4-16BA-8E12-023B029608CD}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\uri-map">
 | 
			
		||||
      <UniqueIdentifier>{E5DFE07F-5901-AF5C-7759-84EBF9717E5E}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\urid">
 | 
			
		||||
      <UniqueIdentifier>{3A189BF7-28D6-C0C4-B831-97AD9E46FE5A}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\worker">
 | 
			
		||||
      <UniqueIdentifier>{829FC6C3-87E7-0491-B8C3-DC3905FB6039}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2">
 | 
			
		||||
      <UniqueIdentifier>{49174595-84D0-A512-B98C-0CFD2D772B8A}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2">
 | 
			
		||||
      <UniqueIdentifier>{E27C67CB-E138-DCCB-110D-623E2C01F9BC}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\serd\serd">
 | 
			
		||||
      <UniqueIdentifier>{392635C4-010A-C8A2-F46D-1A3628445E1C}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\serd\src">
 | 
			
		||||
      <UniqueIdentifier>{1FF26A52-F9B9-625F-DEE9-8FEE0C02F0F4}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\serd">
 | 
			
		||||
      <UniqueIdentifier>{3A5A13A1-B57C-EF05-AC38-53B08A4C8D4A}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\sord\sord">
 | 
			
		||||
      <UniqueIdentifier>{97983FD5-3F19-2B58-4941-D8FBB6B92BA4}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\sord\src\zix">
 | 
			
		||||
      <UniqueIdentifier>{ADC9725E-0948-5908-13BD-0275DB25325A}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\sord\src">
 | 
			
		||||
      <UniqueIdentifier>{37AD6CD9-9FE5-A457-B1FE-36A85F973502}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\sord">
 | 
			
		||||
      <UniqueIdentifier>{0F3B119C-FE8B-3978-2D80-53248BBBCDEA}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\sratom\sratom">
 | 
			
		||||
      <UniqueIdentifier>{5E836BFC-319A-1CE7-13C9-BD9E87F0A228}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\sratom\src">
 | 
			
		||||
      <UniqueIdentifier>{5D8E291B-1BB8-3A55-0939-D13A8589C395}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK\sratom">
 | 
			
		||||
      <UniqueIdentifier>{BE3B7D89-2DE8-3CA1-B00E-55821EF3AAAC}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\LV2_SDK">
 | 
			
		||||
      <UniqueIdentifier>{E0DE9D5D-2792-148A-2CE1-182A90DD5F0E}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\pslextensions">
 | 
			
		||||
      <UniqueIdentifier>{DC27B453-334E-6965-BAD5-7F88C3E5BA46}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\format_types\VST3_SDK\base\source">
 | 
			
		||||
      <UniqueIdentifier>{4DC60E78-BBC0-B540-63A2-37E14ABBEF09}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
@@ -209,6 +335,9 @@
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\scanning">
 | 
			
		||||
      <UniqueIdentifier>{D0584AC3-6837-14F6-90BF-5EA604D1F074}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\utilities\ARA">
 | 
			
		||||
      <UniqueIdentifier>{3CB9AC9F-1F99-25B3-8DC1-7DBB67D2E20C}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="JUCE Modules\juce_audio_processors\utilities">
 | 
			
		||||
      <UniqueIdentifier>{794B64EC-B809-32E3-AD00-4EE6A74802CA}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
@@ -604,15 +733,15 @@
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\buffers\juce_FloatVectorOperations.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_basics\buffers</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\midi\ump\juce_UMP_test.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_basics\midi\ump</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\midi\ump\juce_UMPMidi1ToMidi2DefaultTranslator.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_basics\midi\ump</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\midi\ump\juce_UMPSysEx7.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_basics\midi\ump</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\midi\ump\juce_UMPTests.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_basics\midi\ump</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_basics\midi\ump\juce_UMPUtils.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_basics\midi\ump</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
@@ -724,8 +853,8 @@
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_devices\audio_io\juce_AudioIODeviceType.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_devices\audio_io</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_devices\midi_io\ump\juce_UMPTests.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_devices\midi_io\ump</Filter>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_devices\audio_io\juce_SampleRateHelpers.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_devices\audio_io</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_devices\midi_io\juce_MidiDevices.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_devices\midi_io</Filter>
 | 
			
		||||
@@ -1099,6 +1228,9 @@
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\codecs\juce_WindowsMediaAudioFormat.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_formats\codecs</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\format\juce_ARAAudioReaders.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_formats\format</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_formats\format\juce_AudioFormat.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_formats\format</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
@@ -1135,6 +1267,123 @@
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format\juce_AudioPluginFormatManager.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\zix\tree.c">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\zix</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\collections.c">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lilv\src</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\filesystem.c">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lilv\src</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\instance.c">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lilv\src</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\lib.c">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lilv\src</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\node.c">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lilv\src</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\plugin.c">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lilv\src</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\pluginclass.c">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lilv\src</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\port.c">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lilv\src</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\query.c">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lilv\src</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\scalepoint.c">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lilv\src</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\state.c">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lilv\src</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\ui.c">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lilv\src</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\util.c">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lilv\src</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\world.c">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lilv\src</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\atom\atom-test-utils.c">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\atom</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\atom\atom-test.c">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\atom</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\atom\forge-overflow-test.c">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\atom</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\base64.c">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\serd\src</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\byte_source.c">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\serd\src</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\env.c">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\serd\src</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\n3.c">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\serd\src</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\node.c">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\serd\src</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\reader.c">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\serd\src</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\serdi.c">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\serd\src</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\string.c">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\serd\src</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\system.c">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\serd\src</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\uri.c">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\serd\src</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\writer.c">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\serd\src</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord\src\zix\btree.c">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\sord\src\zix</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord\src\zix\digest.c">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\sord\src\zix</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord\src\zix\hash.c">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\sord\src\zix</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord\src\sord.c">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\sord\src</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord\src\sord_test.c">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\sord\src</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord\src\sord_validate.c">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\sord\src</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord\src\sordi.c">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\sord\src</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord\src\sordmm_test.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\sord\src</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord\src\syntax.c">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\sord\src</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sratom\src\sratom.c">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\sratom\src</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\VST3_SDK\base\source\baseiids.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\VST3_SDK\base\source</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
@@ -1204,6 +1453,12 @@
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\VST3_SDK\public.sdk\source\vst\vstpresetfile.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\VST3_SDK\public.sdk\source\vst</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_ARACommon.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_ARAHosting.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_AudioUnitPluginFormat.mm">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
@@ -1213,9 +1468,21 @@
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_LegacyAudioParameter.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_LV2PluginFormat.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_LV2PluginFormat_test.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_LV2SupportLibs.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_VST3PluginFormat.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_VST3PluginFormat_test.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_VSTPluginFormat.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
@@ -1249,6 +1516,24 @@
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\scanning\juce_PluginListComponent.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\scanning</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\utilities\ARA\juce_ARA_utils.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\utilities\ARA</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\utilities\ARA\juce_ARADocumentController.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\utilities\ARA</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\utilities\ARA\juce_ARADocumentControllerCommon.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\utilities\ARA</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\utilities\ARA\juce_ARAModelObjects.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\utilities\ARA</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\utilities\ARA\juce_ARAPlugInInstanceRoles.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\utilities\ARA</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\utilities\ARA\juce_AudioProcessor_ARAExtensions.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\utilities\ARA</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_AudioParameterBool.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\utilities</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
@@ -1267,6 +1552,9 @@
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_AudioProcessorValueTreeState.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\utilities</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_NativeScaleFactorNotifier.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\utilities</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_ParameterAttachments.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\utilities</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
@@ -1282,6 +1570,12 @@
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\juce_audio_processors.mm">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\juce_audio_processors_ara.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_processors\juce_audio_processors_lv2_libs.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_utils\audio_cd\juce_AudioCDReader.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_utils\audio_cd</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
@@ -1300,9 +1594,15 @@
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_utils\gui\juce_AudioVisualiserComponent.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_utils\gui</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_utils\gui\juce_KeyboardComponentBase.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_utils\gui</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_utils\gui\juce_MidiKeyboardComponent.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_utils\gui</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_utils\gui\juce_MPEKeyboardComponent.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_utils\gui</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_audio_utils\native\juce_android_BluetoothMidiDevicePairingDialogue.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_utils\native</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
@@ -1498,9 +1798,15 @@
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_HashMap_test.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_core\containers</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_ListenerList.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_core\containers</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_NamedValueSet.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_core\containers</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_Optional_test.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_core\containers</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_OwnedArray.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_core\containers</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
@@ -1516,6 +1822,9 @@
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_core\containers\juce_Variant.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_core\containers</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_core\files\juce_common_MimeTypes.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_core\files</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_core\files\juce_DirectoryIterator.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_core\files</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
@@ -1582,6 +1891,9 @@
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_core\misc\juce_Uuid.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_core\misc</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_android_AndroidDocument.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_core\native</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_core\native\juce_android_Files.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_core\native</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
@@ -1858,10 +2170,10 @@
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_data_structures\values\juce_ValueTree.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_data_structures\values</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_data_structures\values\juce_ValueTreeSynchroniser.cpp">
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_data_structures\values\juce_ValueTreePropertyWithDefault_test.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_data_structures\values</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_data_structures\values\juce_ValueWithDefault.cpp">
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_data_structures\values\juce_ValueTreeSynchroniser.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_data_structures\values</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_data_structures\juce_data_structures.cpp">
 | 
			
		||||
@@ -2107,6 +2419,9 @@
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_graphics\geometry\juce_PathStrokeType.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_graphics\geometry</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_graphics\geometry\juce_Rectangle_test.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_graphics\geometry</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_graphics\image_formats\jpglib\jcapimin.c">
 | 
			
		||||
      <Filter>JUCE Modules\juce_graphics\image_formats\jpglib</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
@@ -2593,6 +2908,9 @@
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\misc\juce_DropShadower.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_gui_basics\misc</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\misc\juce_FocusOutline.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_gui_basics\misc</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\misc\juce_JUCESplashScreen.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_gui_basics\misc</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
@@ -2617,6 +2935,9 @@
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_MouseListener.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_gui_basics\mouse</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\accessibility\juce_AccessibilityTextHelpers_test.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_gui_basics\native\accessibility</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\accessibility\juce_android_Accessibility.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_gui_basics\native\accessibility</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
@@ -2653,9 +2974,6 @@
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\juce_android_Windowing.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_gui_basics\native</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\juce_common_MimeTypes.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_gui_basics\native</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\..\..\modules\juce_gui_basics\native\juce_ios_ContentSharer.cpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_gui_basics\native</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
@@ -3037,6 +3355,12 @@
 | 
			
		||||
    <ClCompile Include="..\..\JuceLibraryCode\include_juce_audio_processors.cpp">
 | 
			
		||||
      <Filter>JUCE Library Code</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\JuceLibraryCode\include_juce_audio_processors_ara.cpp">
 | 
			
		||||
      <Filter>JUCE Library Code</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\JuceLibraryCode\include_juce_audio_processors_lv2_libs.cpp">
 | 
			
		||||
      <Filter>JUCE Library Code</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="..\..\JuceLibraryCode\include_juce_audio_utils.cpp">
 | 
			
		||||
      <Filter>JUCE Library Code</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
@@ -3225,6 +3549,9 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\native\juce_mac_CoreAudioLayouts.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_basics\native</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\native\juce_mac_CoreAudioTimeConversions.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_basics\native</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_basics\sources\juce_AudioSource.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_basics\sources</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
@@ -3789,6 +4116,9 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\codecs\juce_WindowsMediaAudioFormat.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_formats\codecs</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\format\juce_ARAAudioReaders.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_formats\format</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_formats\format\juce_AudioFormat.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_formats\format</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
@@ -3825,6 +4155,216 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format\juce_AudioPluginFormatManager.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\lilv\lilv.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lilv\lilv</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\lilv\lilvmm.hpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lilv\lilv</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\zix\common.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\zix</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\zix\tree.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\zix</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\filesystem.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lilv\src</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv\src\lilv_internal.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lilv\src</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\atom\atom.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\atom</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\atom\forge.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\atom</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\atom\util.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\atom</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\buf-size\buf-size.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\buf-size</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\core\attributes.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\core</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\core\lv2.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\core</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\core\lv2_util.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\core</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\data-access\data-access.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\data-access</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\dynmanifest\dynmanifest.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\dynmanifest</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\event\event-helpers.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\event</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\event\event.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\event</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\instance-access\instance-access.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\instance-access</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\log\log.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\log</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\log\logger.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\log</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\midi\midi.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\midi</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\morph\morph.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\morph</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\options\options.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\options</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\parameters\parameters.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\parameters</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\patch\patch.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\patch</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\port-groups\port-groups.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\port-groups</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\port-props\port-props.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\port-props</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\presets\presets.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\presets</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\resize-port\resize-port.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\resize-port</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\state\state.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\state</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\time\time.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\time</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\ui\ui.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\ui</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\units\units.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\units</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\uri-map\uri-map.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\uri-map</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\urid\urid.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\urid</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\worker\worker.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\lv2\lv2\worker</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\serd\serd.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\serd\serd</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\attributes.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\serd\src</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\base64.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\serd\src</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\byte_sink.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\serd\src</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\byte_source.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\serd\src</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\node.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\serd\src</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\reader.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\serd\src</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\serd_config.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\serd\src</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\serd_internal.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\serd\src</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\stack.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\serd\src</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\string_utils.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\serd\src</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\system.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\serd\src</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd\src\uri_utils.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\serd\src</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord\sord\sord.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\sord\sord</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord\sord\sordmm.hpp">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\sord\sord</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord\src\zix\btree.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\sord\src\zix</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord\src\zix\common.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\sord\src\zix</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord\src\zix\digest.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\sord\src\zix</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord\src\zix\hash.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\sord\src\zix</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord\src\sord_config.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\sord\src</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord\src\sord_internal.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\sord\src</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sratom\sratom\sratom.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK\sratom\sratom</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\juce_lv2_config.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\lilv_config.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\serd_config.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\sord_config.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\pslextensions\ipslcontextinfo.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\pslextensions</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\pslextensions\ipsleditcontroller.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\pslextensions</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\pslextensions\ipslgainreduction.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\pslextensions</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\pslextensions\ipslhostcommands.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\pslextensions</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\pslextensions\ipslviewembedding.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\pslextensions</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\pslextensions\ipslviewscaling.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\pslextensions</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\pslextensions\pslauextensions.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\pslextensions</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\pslextensions\pslvst2extensions.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\pslextensions</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\VST3_SDK\base\source\classfactoryhelpers.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\VST3_SDK\base\source</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
@@ -4020,6 +4560,12 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\VST3_SDK\public.sdk\source\vst\vstpresetfile.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\VST3_SDK\public.sdk\source\vst</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_ARACommon.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_ARAHosting.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_AU_Shared.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
@@ -4029,6 +4575,15 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_LADSPAPluginFormat.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_LV2Common.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_LV2PluginFormat.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_LV2Resources.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\format_types\juce_VST3Common.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
@@ -4074,6 +4629,9 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\processors\juce_GenericAudioProcessorEditor.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\processors</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\processors\juce_HostedAudioProcessorParameter.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\processors</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\processors\juce_PluginDescription.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\processors</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
@@ -4086,6 +4644,24 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\scanning\juce_PluginListComponent.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\scanning</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\ARA\juce_ARA_utils.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\utilities\ARA</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\ARA\juce_ARADebug.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\utilities\ARA</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\ARA\juce_ARADocumentController.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\utilities\ARA</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\ARA\juce_ARAModelObjects.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\utilities\ARA</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\ARA\juce_ARAPlugInInstanceRoles.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\utilities\ARA</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\ARA\juce_AudioProcessor_ARAExtensions.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\utilities\ARA</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_AudioParameterBool.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\utilities</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
@@ -4107,6 +4683,12 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_ExtensionsVisitor.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\utilities</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_FlagCache.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\utilities</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_NativeScaleFactorNotifier.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\utilities</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_processors\utilities\juce_ParameterAttachments.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\utilities</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
@@ -4152,9 +4734,15 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_utils\gui\juce_BluetoothMidiDevicePairingDialogue.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_utils\gui</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_utils\gui\juce_KeyboardComponentBase.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_utils\gui</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_utils\gui\juce_MidiKeyboardComponent.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_utils\gui</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_utils\gui\juce_MPEKeyboardComponent.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_utils\gui</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_audio_utils\players\juce_AudioProcessorPlayer.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_utils\players</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
@@ -4338,6 +4926,9 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_NamedValueSet.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_core\containers</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_Optional.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_core\containers</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_OwnedArray.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_core\containers</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
@@ -4350,6 +4941,9 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_ScopedValueSetter.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_core\containers</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_SingleThreadedAbstractFifo.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_core\containers</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_SortedSet.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_core\containers</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
@@ -4359,6 +4953,12 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\containers\juce_Variant.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_core\containers</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\files\juce_AndroidDocument.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_core\files</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\files\juce_common_MimeTypes.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_core\files</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\files\juce_DirectoryIterator.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_core\files</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
@@ -4455,6 +5055,9 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_ReferenceCountedObject.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_core\memory</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_Reservoir.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_core\memory</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\memory\juce_ScopedPointer.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_core\memory</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
@@ -4527,6 +5130,9 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\network\juce_WebInputStream.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_core\network</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\streams\juce_AndroidDocumentInputSource.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_core\streams</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_core\streams\juce_BufferedInputStream.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_core\streams</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
@@ -4773,10 +5379,10 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_data_structures\values\juce_ValueTree.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_data_structures\values</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_data_structures\values\juce_ValueTreeSynchroniser.h">
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_data_structures\values\juce_ValueTreePropertyWithDefault.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_data_structures\values</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_data_structures\values\juce_ValueWithDefault.h">
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_data_structures\values\juce_ValueTreeSynchroniser.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_data_structures\values</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_data_structures\juce_data_structures.h">
 | 
			
		||||
@@ -4980,6 +5586,9 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_events\native\juce_linux_EventLoop.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_events\native</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_events\native\juce_linux_EventLoopInternal.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_events\native</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_events\native\juce_osx_MessageQueue.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_events\native</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
@@ -5157,6 +5766,9 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_graphics\images\juce_ImageFileFormat.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_graphics\images</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_graphics\images\juce_ScaledImage.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_graphics\images</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_graphics\native\juce_mac_CoreGraphicsContext.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_graphics\native</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
@@ -5463,6 +6075,9 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\misc\juce_DropShadower.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_gui_basics\misc</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\misc\juce_FocusOutline.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_gui_basics\misc</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\misc\juce_JUCESplashScreen.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_gui_basics\misc</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
@@ -5496,6 +6111,9 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_MouseListener.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_gui_basics\mouse</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_PointerState.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_gui_basics\mouse</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\mouse\juce_SelectedItemSet.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_gui_basics\mouse</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
@@ -5511,6 +6129,9 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\native\accessibility\juce_win32_AccessibilityElement.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_gui_basics\native\accessibility</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\native\accessibility\juce_win32_ComInterfaces.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_gui_basics\native\accessibility</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\native\accessibility\juce_win32_UIAExpandCollapseProvider.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_gui_basics\native\accessibility</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
@@ -5562,9 +6183,15 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\native\x11\juce_linux_XWindowSystem.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_gui_basics\native\x11</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\native\juce_mac_CGMetalLayerRenderer.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_gui_basics\native</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\native\juce_MultiTouchMapper.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_gui_basics\native</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\native\juce_ScopedDPIAwarenessDisabler.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_gui_basics\native</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_basics\native\juce_win32_ScopedThreadDPIAwarenessSetter.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_gui_basics\native</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
@@ -5727,9 +6354,6 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\embedding\juce_NSViewComponent.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_gui_extra\embedding</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\embedding\juce_ScopedDPIAwarenessDisabler.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_gui_extra\embedding</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\embedding\juce_UIViewComponent.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_gui_extra\embedding</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
@@ -5772,7 +6396,7 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\misc\juce_WebBrowserComponent.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_gui_extra\misc</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\native\juce_mac_CarbonViewWrapperComponent.h">
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\native\juce_mac_NSViewFrameWatcher.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_gui_extra\native</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_gui_extra\juce_gui_extra.h">
 | 
			
		||||
@@ -5919,6 +6543,9 @@
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_win32_CameraDevice.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_video\native</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_win32_ComTypes.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_video\native</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\..\..\..\modules\juce_video\native\juce_win32_Video.h">
 | 
			
		||||
      <Filter>JUCE Modules\juce_video\native</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
@@ -5951,6 +6578,9 @@
 | 
			
		||||
    <None Include="..\..\..\..\modules\juce_audio_formats\codecs\oggvorbis\Ogg Vorbis Licence.txt">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_formats\codecs\oggvorbis</Filter>
 | 
			
		||||
    </None>
 | 
			
		||||
    <None Include="..\..\..\..\modules\juce_audio_processors\format_types\LV2_SDK\README.md">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\LV2_SDK</Filter>
 | 
			
		||||
    </None>
 | 
			
		||||
    <None Include="..\..\..\..\modules\juce_audio_processors\format_types\VST3_SDK\base\LICENSE.txt">
 | 
			
		||||
      <Filter>JUCE Modules\juce_audio_processors\format_types\VST3_SDK\base</Filter>
 | 
			
		||||
    </None>
 | 
			
		||||
 
 | 
			
		||||
@@ -9,7 +9,7 @@
 | 
			
		||||
#include <windows.h>
 | 
			
		||||
 | 
			
		||||
VS_VERSION_INFO VERSIONINFO
 | 
			
		||||
FILEVERSION  6,1,2,0
 | 
			
		||||
FILEVERSION  7,0,2,0
 | 
			
		||||
BEGIN
 | 
			
		||||
  BLOCK "StringFileInfo"
 | 
			
		||||
  BEGIN
 | 
			
		||||
@@ -18,9 +18,9 @@ BEGIN
 | 
			
		||||
      VALUE "CompanyName",  "Raw Material Software Limited\0"
 | 
			
		||||
      VALUE "LegalCopyright",  "Copyright (c) 2020 - Raw Material Software Limited\0"
 | 
			
		||||
      VALUE "FileDescription",  "DemoRunner\0"
 | 
			
		||||
      VALUE "FileVersion",  "6.1.2\0"
 | 
			
		||||
      VALUE "FileVersion",  "7.0.2\0"
 | 
			
		||||
      VALUE "ProductName",  "DemoRunner\0"
 | 
			
		||||
      VALUE "ProductVersion",  "6.1.2\0"
 | 
			
		||||
      VALUE "ProductVersion",  "7.0.2\0"
 | 
			
		||||
    END
 | 
			
		||||
  END
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,20 +1,21 @@
 | 
			
		||||
Microsoft Visual Studio Solution File, Format Version 11.00
 | 
			
		||||
# Visual Studio 2015
 | 
			
		||||
 | 
			
		||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DemoRunner - App", "DemoRunner_App.vcxproj", "{882FE2E3-F4EF-9825-1908-F6FEE5366B5C}"
 | 
			
		||||
EndProject
 | 
			
		||||
Global
 | 
			
		||||
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 | 
			
		||||
		Debug|x64 = Debug|x64
 | 
			
		||||
		Release|x64 = Release|x64
 | 
			
		||||
	EndGlobalSection
 | 
			
		||||
	GlobalSection(ProjectConfigurationPlatforms) = postSolution
 | 
			
		||||
		{882FE2E3-F4EF-9825-1908-F6FEE5366B5C}.Debug|x64.ActiveCfg = Debug|x64
 | 
			
		||||
		{882FE2E3-F4EF-9825-1908-F6FEE5366B5C}.Debug|x64.Build.0 = Debug|x64
 | 
			
		||||
		{882FE2E3-F4EF-9825-1908-F6FEE5366B5C}.Release|x64.ActiveCfg = Release|x64
 | 
			
		||||
		{882FE2E3-F4EF-9825-1908-F6FEE5366B5C}.Release|x64.Build.0 = Release|x64
 | 
			
		||||
	EndGlobalSection
 | 
			
		||||
	GlobalSection(SolutionProperties) = preSolution
 | 
			
		||||
		HideSolutionNode = FALSE
 | 
			
		||||
	EndGlobalSection
 | 
			
		||||
EndGlobal
 | 
			
		||||
 | 
			
		||||
Microsoft Visual Studio Solution File, Format Version 11.00
 | 
			
		||||
# Visual Studio Version 17
 | 
			
		||||
 | 
			
		||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DemoRunner - App", "DemoRunner_App.vcxproj", "{882FE2E3-F4EF-9825-1908-F6FEE5366B5C}"
 | 
			
		||||
EndProject
 | 
			
		||||
Global
 | 
			
		||||
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 | 
			
		||||
		Debug|x64 = Debug|x64
 | 
			
		||||
		Release|x64 = Release|x64
 | 
			
		||||
	EndGlobalSection
 | 
			
		||||
	GlobalSection(ProjectConfigurationPlatforms) = postSolution
 | 
			
		||||
		{882FE2E3-F4EF-9825-1908-F6FEE5366B5C}.Debug|x64.ActiveCfg = Debug|x64
 | 
			
		||||
		{882FE2E3-F4EF-9825-1908-F6FEE5366B5C}.Debug|x64.Build.0 = Debug|x64
 | 
			
		||||
		{882FE2E3-F4EF-9825-1908-F6FEE5366B5C}.Release|x64.ActiveCfg = Release|x64
 | 
			
		||||
		{882FE2E3-F4EF-9825-1908-F6FEE5366B5C}.Release|x64.Build.0 = Release|x64
 | 
			
		||||
	EndGlobalSection
 | 
			
		||||
	GlobalSection(SolutionProperties) = preSolution
 | 
			
		||||
		HideSolutionNode = FALSE
 | 
			
		||||
	EndGlobalSection
 | 
			
		||||
EndGlobal
 | 
			
		||||
| 
		 Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 44 KiB  | 
@@ -1,36 +1,36 @@
 | 
			
		||||
#pragma code_page(65001)
 | 
			
		||||
 | 
			
		||||
#ifdef JUCE_USER_DEFINED_RC_FILE
 | 
			
		||||
 #include JUCE_USER_DEFINED_RC_FILE
 | 
			
		||||
#else
 | 
			
		||||
 | 
			
		||||
#undef  WIN32_LEAN_AND_MEAN
 | 
			
		||||
#define WIN32_LEAN_AND_MEAN
 | 
			
		||||
#include <windows.h>
 | 
			
		||||
 | 
			
		||||
VS_VERSION_INFO VERSIONINFO
 | 
			
		||||
FILEVERSION  6,1,2,0
 | 
			
		||||
BEGIN
 | 
			
		||||
  BLOCK "StringFileInfo"
 | 
			
		||||
  BEGIN
 | 
			
		||||
    BLOCK "040904E4"
 | 
			
		||||
    BEGIN
 | 
			
		||||
      VALUE "CompanyName",  "Raw Material Software Limited\0"
 | 
			
		||||
      VALUE "LegalCopyright",  "Copyright (c) 2020 - Raw Material Software Limited\0"
 | 
			
		||||
      VALUE "FileDescription",  "DemoRunner\0"
 | 
			
		||||
      VALUE "FileVersion",  "6.1.2\0"
 | 
			
		||||
      VALUE "ProductName",  "DemoRunner\0"
 | 
			
		||||
      VALUE "ProductVersion",  "6.1.2\0"
 | 
			
		||||
    END
 | 
			
		||||
  END
 | 
			
		||||
 | 
			
		||||
  BLOCK "VarFileInfo"
 | 
			
		||||
  BEGIN
 | 
			
		||||
    VALUE "Translation", 0x409, 1252
 | 
			
		||||
  END
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
IDI_ICON1 ICON DISCARDABLE "icon.ico"
 | 
			
		||||
#pragma code_page(65001)
 | 
			
		||||
 | 
			
		||||
#ifdef JUCE_USER_DEFINED_RC_FILE
 | 
			
		||||
 #include JUCE_USER_DEFINED_RC_FILE
 | 
			
		||||
#else
 | 
			
		||||
 | 
			
		||||
#undef  WIN32_LEAN_AND_MEAN
 | 
			
		||||
#define WIN32_LEAN_AND_MEAN
 | 
			
		||||
#include <windows.h>
 | 
			
		||||
 | 
			
		||||
VS_VERSION_INFO VERSIONINFO
 | 
			
		||||
FILEVERSION  7,0,2,0
 | 
			
		||||
BEGIN
 | 
			
		||||
  BLOCK "StringFileInfo"
 | 
			
		||||
  BEGIN
 | 
			
		||||
    BLOCK "040904E4"
 | 
			
		||||
    BEGIN
 | 
			
		||||
      VALUE "CompanyName",  "Raw Material Software Limited\0"
 | 
			
		||||
      VALUE "LegalCopyright",  "Copyright (c) 2020 - Raw Material Software Limited\0"
 | 
			
		||||
      VALUE "FileDescription",  "DemoRunner\0"
 | 
			
		||||
      VALUE "FileVersion",  "7.0.2\0"
 | 
			
		||||
      VALUE "ProductName",  "DemoRunner\0"
 | 
			
		||||
      VALUE "ProductVersion",  "7.0.2\0"
 | 
			
		||||
    END
 | 
			
		||||
  END
 | 
			
		||||
 | 
			
		||||
  BLOCK "VarFileInfo"
 | 
			
		||||
  BEGIN
 | 
			
		||||
    VALUE "Translation", 0x409, 1252
 | 
			
		||||
  END
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
IDI_ICON1 ICON DISCARDABLE "icon.ico"
 | 
			
		||||
IDI_ICON2 ICON DISCARDABLE "icon.ico"
 | 
			
		||||
@@ -25,9 +25,11 @@
 | 
			
		||||
		527DA2E6827BAFDDD3E8E80F /* CoreAudioKit.framework */ = {isa = PBXBuildFile; fileRef = B4389672DA4CC8E0A531062D; };
 | 
			
		||||
		5CB78489F16E82144914972D /* include_juce_gui_extra.mm */ = {isa = PBXBuildFile; fileRef = 979F23EA9E5E76131299E886; };
 | 
			
		||||
		5E4310B3F6BB639875D3E9B8 /* Foundation.framework */ = {isa = PBXBuildFile; fileRef = 49ECA8B998B339A083674A22; };
 | 
			
		||||
		5EB6872A39122A5AB67E544E /* include_juce_audio_processors_ara.cpp */ = {isa = PBXBuildFile; fileRef = 8D44097417573B38729A0179; };
 | 
			
		||||
		611298FAC1A543BDD10D4C41 /* include_juce_box2d.cpp */ = {isa = PBXBuildFile; fileRef = 4DF215D350FFE5E119CBA7E5; };
 | 
			
		||||
		63A2F309E55DAC206E9B97E3 /* App */ = {isa = PBXBuildFile; fileRef = CFF2BBEB242CC8B3B904B5F9; };
 | 
			
		||||
		6658EEC5F9D63D3419EB7098 /* CoreServices.framework */ = {isa = PBXBuildFile; fileRef = E07FC48041C3E9F9721F3BCE; };
 | 
			
		||||
		67D7E529C3713ED79F5F3AA9 /* include_juce_audio_processors_lv2_libs.cpp */ = {isa = PBXBuildFile; fileRef = 5BD7D121AD30987C08BE10E8; };
 | 
			
		||||
		6A61CBB4E39BFD392D97528F /* CoreMIDI.framework */ = {isa = PBXBuildFile; fileRef = 61AE09C749B007B70A265D9B; };
 | 
			
		||||
		6B5560283DEEBD6DD2D6C984 /* include_juce_dsp.mm */ = {isa = PBXBuildFile; fileRef = C1E93FAF6C68A40A664422CD; };
 | 
			
		||||
		712D81867EC698463252FA79 /* include_juce_audio_utils.mm */ = {isa = PBXBuildFile; fileRef = EDDA01B246C6128CAF7A2914; };
 | 
			
		||||
@@ -87,6 +89,7 @@
 | 
			
		||||
		4FE6029FF76BCE9698595DC5 /* juce_product_unlocking */ /* juce_product_unlocking */ = {isa = PBXFileReference; lastKnownFileType = folder; name = juce_product_unlocking; path = ../../../../modules/juce_product_unlocking; sourceTree = SOURCE_ROOT; };
 | 
			
		||||
		5965349393850F41DF76F350 /* include_juce_analytics.cpp */ /* include_juce_analytics.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = include_juce_analytics.cpp; path = ../../JuceLibraryCode/include_juce_analytics.cpp; sourceTree = SOURCE_ROOT; };
 | 
			
		||||
		5A9F2000C66D24E8B01BE60B /* juce_gui_basics */ /* juce_gui_basics */ = {isa = PBXFileReference; lastKnownFileType = folder; name = juce_gui_basics; path = ../../../../modules/juce_gui_basics; sourceTree = SOURCE_ROOT; };
 | 
			
		||||
		5BD7D121AD30987C08BE10E8 /* include_juce_audio_processors_lv2_libs.cpp */ /* include_juce_audio_processors_lv2_libs.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = include_juce_audio_processors_lv2_libs.cpp; path = ../../JuceLibraryCode/include_juce_audio_processors_lv2_libs.cpp; sourceTree = SOURCE_ROOT; };
 | 
			
		||||
		60F2869DC345EAF2314D6C09 /* juce_audio_devices */ /* juce_audio_devices */ = {isa = PBXFileReference; lastKnownFileType = folder; name = juce_audio_devices; path = ../../../../modules/juce_audio_devices; sourceTree = SOURCE_ROOT; };
 | 
			
		||||
		61AE09C749B007B70A265D9B /* CoreMIDI.framework */ /* CoreMIDI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMIDI.framework; path = System/Library/Frameworks/CoreMIDI.framework; sourceTree = SDKROOT; };
 | 
			
		||||
		651ECE3C7BA845DDCFEE48F3 /* juce_osc */ /* juce_osc */ = {isa = PBXFileReference; lastKnownFileType = folder; name = juce_osc; path = ../../../../modules/juce_osc; sourceTree = SOURCE_ROOT; };
 | 
			
		||||
@@ -102,6 +105,7 @@
 | 
			
		||||
		8135645508EEFDBDCDF2ADC6 /* Images.xcassets */ /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = DemoRunner/Images.xcassets; sourceTree = SOURCE_ROOT; };
 | 
			
		||||
		873F9DD54978E601102353B4 /* CoreText.framework */ /* CoreText.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreText.framework; path = System/Library/Frameworks/CoreText.framework; sourceTree = SDKROOT; };
 | 
			
		||||
		8CE533D611CD0984AD028D73 /* juce_graphics */ /* juce_graphics */ = {isa = PBXFileReference; lastKnownFileType = folder; name = juce_graphics; path = ../../../../modules/juce_graphics; sourceTree = SOURCE_ROOT; };
 | 
			
		||||
		8D44097417573B38729A0179 /* include_juce_audio_processors_ara.cpp */ /* include_juce_audio_processors_ara.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = include_juce_audio_processors_ara.cpp; path = ../../JuceLibraryCode/include_juce_audio_processors_ara.cpp; sourceTree = SOURCE_ROOT; };
 | 
			
		||||
		903CD4126C779884797EF915 /* juce_core */ /* juce_core */ = {isa = PBXFileReference; lastKnownFileType = folder; name = juce_core; path = ../../../../modules/juce_core; sourceTree = SOURCE_ROOT; };
 | 
			
		||||
		9144821E003E15E4042B57DB /* include_juce_video.mm */ /* include_juce_video.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = include_juce_video.mm; path = ../../JuceLibraryCode/include_juce_video.mm; sourceTree = SOURCE_ROOT; };
 | 
			
		||||
		934ACDCB3FD9D223A3481D8F /* JUCEDemos.cpp */ /* JUCEDemos.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = JUCEDemos.cpp; path = ../../Source/Demos/JUCEDemos.cpp; sourceTree = SOURCE_ROOT; };
 | 
			
		||||
@@ -224,6 +228,8 @@
 | 
			
		||||
				03A63C3CA6F24977F19C316D,
 | 
			
		||||
				E061A1C75FA5722167FC4997,
 | 
			
		||||
				E67AB94002886AF67437D6AE,
 | 
			
		||||
				8D44097417573B38729A0179,
 | 
			
		||||
				5BD7D121AD30987C08BE10E8,
 | 
			
		||||
				EDDA01B246C6128CAF7A2914,
 | 
			
		||||
				4DF215D350FFE5E119CBA7E5,
 | 
			
		||||
				3BC9753E0CD75A36DC742EE0,
 | 
			
		||||
@@ -345,7 +351,7 @@
 | 
			
		||||
		AC6F0E9A0809A184B2C2B7DE = {
 | 
			
		||||
			isa = PBXProject;
 | 
			
		||||
			attributes = {
 | 
			
		||||
				LastUpgradeCheck = 1300;
 | 
			
		||||
				LastUpgradeCheck = 1340;
 | 
			
		||||
				ORGANIZATIONNAME = "Raw Material Software Limited";
 | 
			
		||||
				TargetAttributes = {
 | 
			
		||||
					291E01DCBE746A376DBFA4D1 = {
 | 
			
		||||
@@ -421,6 +427,8 @@
 | 
			
		||||
				9EACEA6BE8D0ACC72C12C080,
 | 
			
		||||
				26652AB1BB77C8A39434775F,
 | 
			
		||||
				2707968B431D83AC7E28E49B,
 | 
			
		||||
				5EB6872A39122A5AB67E544E,
 | 
			
		||||
				67D7E529C3713ED79F5F3AA9,
 | 
			
		||||
				712D81867EC698463252FA79,
 | 
			
		||||
				611298FAC1A543BDD10D4C41,
 | 
			
		||||
				D183F8140174ACCDDCD230A2,
 | 
			
		||||
@@ -511,7 +519,7 @@
 | 
			
		||||
					"JUCE_CONTENT_SHARING=1",
 | 
			
		||||
					"JUCE_DISPLAY_SPLASH_SCREEN=0",
 | 
			
		||||
					"JUCE_USE_DARK_SPLASH_SCREEN=1",
 | 
			
		||||
					"JUCE_PROJUCER_VERSION=0x60102",
 | 
			
		||||
					"JUCE_PROJUCER_VERSION=0x70002",
 | 
			
		||||
					"JUCE_MODULE_AVAILABLE_juce_analytics=1",
 | 
			
		||||
					"JUCE_MODULE_AVAILABLE_juce_audio_basics=1",
 | 
			
		||||
					"JUCE_MODULE_AVAILABLE_juce_audio_devices=1",
 | 
			
		||||
@@ -533,6 +541,8 @@
 | 
			
		||||
					"JUCE_MODULE_AVAILABLE_juce_video=1",
 | 
			
		||||
					"JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1",
 | 
			
		||||
					"JUCE_USE_MP3AUDIOFORMAT=1",
 | 
			
		||||
					"JUCE_PLUGINHOST_VST3=1",
 | 
			
		||||
					"JUCE_PLUGINHOST_LV2=1",
 | 
			
		||||
					"JUCE_ALLOW_STATIC_NULL_VARIABLES=0",
 | 
			
		||||
					"JUCE_STRICT_REFCOUNTEDPOINTER=1",
 | 
			
		||||
					"JUCE_USE_CAMERA=1",
 | 
			
		||||
@@ -540,19 +550,28 @@
 | 
			
		||||
					"JUCE_DEMO_RUNNER=1",
 | 
			
		||||
					"JUCE_UNIT_TESTS=1",
 | 
			
		||||
					"JUCER_XCODE_IPHONE_5BC26AE3=1",
 | 
			
		||||
					"JUCE_APP_VERSION=6.1.2",
 | 
			
		||||
					"JUCE_APP_VERSION_HEX=0x60102",
 | 
			
		||||
					"JUCE_APP_VERSION=7.0.2",
 | 
			
		||||
					"JUCE_APP_VERSION_HEX=0x70002",
 | 
			
		||||
					"JucePlugin_Build_VST=0",
 | 
			
		||||
					"JucePlugin_Build_VST3=0",
 | 
			
		||||
					"JucePlugin_Build_AU=0",
 | 
			
		||||
					"JucePlugin_Build_AUv3=0",
 | 
			
		||||
					"JucePlugin_Build_RTAS=0",
 | 
			
		||||
					"JucePlugin_Build_AAX=0",
 | 
			
		||||
					"JucePlugin_Build_Standalone=0",
 | 
			
		||||
					"JucePlugin_Build_Unity=0",
 | 
			
		||||
					"JucePlugin_Build_LV2=0",
 | 
			
		||||
				);
 | 
			
		||||
				GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
 | 
			
		||||
				HEADER_SEARCH_PATHS = (
 | 
			
		||||
					"$(SRCROOT)/../../../../modules/juce_audio_processors/format_types/LV2_SDK/lilv/src",
 | 
			
		||||
					"$(SRCROOT)/../../../../modules/juce_audio_processors/format_types/LV2_SDK/lilv",
 | 
			
		||||
					"$(SRCROOT)/../../../../modules/juce_audio_processors/format_types/LV2_SDK/sratom",
 | 
			
		||||
					"$(SRCROOT)/../../../../modules/juce_audio_processors/format_types/LV2_SDK/sord/src",
 | 
			
		||||
					"$(SRCROOT)/../../../../modules/juce_audio_processors/format_types/LV2_SDK/sord",
 | 
			
		||||
					"$(SRCROOT)/../../../../modules/juce_audio_processors/format_types/LV2_SDK/serd",
 | 
			
		||||
					"$(SRCROOT)/../../../../modules/juce_audio_processors/format_types/LV2_SDK/lv2",
 | 
			
		||||
					"$(SRCROOT)/../../../../modules/juce_audio_processors/format_types/LV2_SDK",
 | 
			
		||||
					"$(SRCROOT)/../../../../modules/juce_audio_processors/format_types/VST3_SDK",
 | 
			
		||||
					"$(SRCROOT)/../../JuceLibraryCode",
 | 
			
		||||
					"$(SRCROOT)/../../../../modules",
 | 
			
		||||
					"$(inherited)",
 | 
			
		||||
@@ -561,9 +580,10 @@
 | 
			
		||||
				INFOPLIST_PREPROCESS = NO;
 | 
			
		||||
				INSTALL_PATH = "$(HOME)/Applications";
 | 
			
		||||
				LLVM_LTO = YES;
 | 
			
		||||
				MTL_HEADER_SEARCH_PATHS = "$(SRCROOT)/../../JuceLibraryCode $(SRCROOT)/../../../../modules";
 | 
			
		||||
				OTHER_CFLAGS = "-Wall -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wswitch-enum -Wsign-conversion -Wsign-compare -Wunreachable-code -Wcast-align -Wno-ignored-qualifiers -Wshorten-64-to-32 -Wconversion -Wint-conversion -Wconditional-uninitialized -Wconstant-conversion -Wbool-conversion -Wextra-semi -Wshift-sign-overflow -Wno-missing-field-initializers -Wshadow-all -Wnullable-to-nonnull-conversion";
 | 
			
		||||
				OTHER_CPLUSPLUSFLAGS = "-Woverloaded-virtual -Wreorder -Wzero-as-null-pointer-constant -Wunused-private-field -Winconsistent-missing-destructor-override -Wall -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wswitch-enum -Wsign-conversion -Wsign-compare -Wunreachable-code -Wcast-align -Wno-ignored-qualifiers -Wshorten-64-to-32 -Wconversion -Wint-conversion -Wconditional-uninitialized -Wconstant-conversion -Wbool-conversion -Wextra-semi -Wshift-sign-overflow -Wno-missing-field-initializers -Wshadow-all -Wnullable-to-nonnull-conversion";
 | 
			
		||||
				MTL_HEADER_SEARCH_PATHS = "$(SRCROOT)/../../../../modules/juce_audio_processors/format_types/LV2_SDK/lilv/src $(SRCROOT)/../../../../modules/juce_audio_processors/format_types/LV2_SDK/lilv $(SRCROOT)/../../../../modules/juce_audio_processors/format_types/LV2_SDK/sratom $(SRCROOT)/../../../../modules/juce_audio_processors/format_types/LV2_SDK/sord/src $(SRCROOT)/../../../../modules/juce_audio_processors/format_types/LV2_SDK/sord $(SRCROOT)/../../../../modules/juce_audio_processors/format_types/LV2_SDK/serd $(SRCROOT)/../../../../modules/juce_audio_processors/format_types/LV2_SDK/lv2 $(SRCROOT)/../../../../modules/juce_audio_processors/format_types/LV2_SDK $(SRCROOT)/../../../../modules/juce_audio_processors/format_types/VST3_SDK $(SRCROOT)/../../JuceLibraryCode $(SRCROOT)/../../../../modules";
 | 
			
		||||
				OTHER_CFLAGS = "-Wall -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wswitch-enum -Wsign-conversion -Wsign-compare -Wunreachable-code -Wcast-align -Wno-ignored-qualifiers -Wshorten-64-to-32 -Wconversion -Wint-conversion -Wconditional-uninitialized -Wconstant-conversion -Wbool-conversion -Wextra-semi -Wshift-sign-overflow -Wshadow-all -Wnullable-to-nonnull-conversion -Wmissing-prototypes -Wunguarded-availability -Wunguarded-availability-new";
 | 
			
		||||
				OTHER_CPLUSPLUSFLAGS = "-Woverloaded-virtual -Wreorder -Wzero-as-null-pointer-constant -Wunused-private-field -Winconsistent-missing-destructor-override -Wall -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wswitch-enum -Wsign-conversion -Wsign-compare -Wunreachable-code -Wcast-align -Wno-ignored-qualifiers -Wshorten-64-to-32 -Wconversion -Wint-conversion -Wconditional-uninitialized -Wconstant-conversion -Wbool-conversion -Wextra-semi -Wshift-sign-overflow -Wshadow-all -Wnullable-to-nonnull-conversion -Wmissing-prototypes -Wunguarded-availability -Wunguarded-availability-new";
 | 
			
		||||
				OTHER_LDFLAGS = "-weak_framework Metal -weak_framework MetalKit -weak_framework UserNotifications";
 | 
			
		||||
				PRODUCT_BUNDLE_IDENTIFIER = com.rmsl.jucedemorunner;
 | 
			
		||||
				PRODUCT_NAME = "DemoRunner";
 | 
			
		||||
				USE_HEADERMAP = NO;
 | 
			
		||||
@@ -591,7 +611,7 @@
 | 
			
		||||
					"JUCE_CONTENT_SHARING=1",
 | 
			
		||||
					"JUCE_DISPLAY_SPLASH_SCREEN=0",
 | 
			
		||||
					"JUCE_USE_DARK_SPLASH_SCREEN=1",
 | 
			
		||||
					"JUCE_PROJUCER_VERSION=0x60102",
 | 
			
		||||
					"JUCE_PROJUCER_VERSION=0x70002",
 | 
			
		||||
					"JUCE_MODULE_AVAILABLE_juce_analytics=1",
 | 
			
		||||
					"JUCE_MODULE_AVAILABLE_juce_audio_basics=1",
 | 
			
		||||
					"JUCE_MODULE_AVAILABLE_juce_audio_devices=1",
 | 
			
		||||
@@ -613,6 +633,8 @@
 | 
			
		||||
					"JUCE_MODULE_AVAILABLE_juce_video=1",
 | 
			
		||||
					"JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1",
 | 
			
		||||
					"JUCE_USE_MP3AUDIOFORMAT=1",
 | 
			
		||||
					"JUCE_PLUGINHOST_VST3=1",
 | 
			
		||||
					"JUCE_PLUGINHOST_LV2=1",
 | 
			
		||||
					"JUCE_ALLOW_STATIC_NULL_VARIABLES=0",
 | 
			
		||||
					"JUCE_STRICT_REFCOUNTEDPOINTER=1",
 | 
			
		||||
					"JUCE_USE_CAMERA=1",
 | 
			
		||||
@@ -620,19 +642,28 @@
 | 
			
		||||
					"JUCE_DEMO_RUNNER=1",
 | 
			
		||||
					"JUCE_UNIT_TESTS=1",
 | 
			
		||||
					"JUCER_XCODE_IPHONE_5BC26AE3=1",
 | 
			
		||||
					"JUCE_APP_VERSION=6.1.2",
 | 
			
		||||
					"JUCE_APP_VERSION_HEX=0x60102",
 | 
			
		||||
					"JUCE_APP_VERSION=7.0.2",
 | 
			
		||||
					"JUCE_APP_VERSION_HEX=0x70002",
 | 
			
		||||
					"JucePlugin_Build_VST=0",
 | 
			
		||||
					"JucePlugin_Build_VST3=0",
 | 
			
		||||
					"JucePlugin_Build_AU=0",
 | 
			
		||||
					"JucePlugin_Build_AUv3=0",
 | 
			
		||||
					"JucePlugin_Build_RTAS=0",
 | 
			
		||||
					"JucePlugin_Build_AAX=0",
 | 
			
		||||
					"JucePlugin_Build_Standalone=0",
 | 
			
		||||
					"JucePlugin_Build_Unity=0",
 | 
			
		||||
					"JucePlugin_Build_LV2=0",
 | 
			
		||||
				);
 | 
			
		||||
				GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
 | 
			
		||||
				HEADER_SEARCH_PATHS = (
 | 
			
		||||
					"$(SRCROOT)/../../../../modules/juce_audio_processors/format_types/LV2_SDK/lilv/src",
 | 
			
		||||
					"$(SRCROOT)/../../../../modules/juce_audio_processors/format_types/LV2_SDK/lilv",
 | 
			
		||||
					"$(SRCROOT)/../../../../modules/juce_audio_processors/format_types/LV2_SDK/sratom",
 | 
			
		||||
					"$(SRCROOT)/../../../../modules/juce_audio_processors/format_types/LV2_SDK/sord/src",
 | 
			
		||||
					"$(SRCROOT)/../../../../modules/juce_audio_processors/format_types/LV2_SDK/sord",
 | 
			
		||||
					"$(SRCROOT)/../../../../modules/juce_audio_processors/format_types/LV2_SDK/serd",
 | 
			
		||||
					"$(SRCROOT)/../../../../modules/juce_audio_processors/format_types/LV2_SDK/lv2",
 | 
			
		||||
					"$(SRCROOT)/../../../../modules/juce_audio_processors/format_types/LV2_SDK",
 | 
			
		||||
					"$(SRCROOT)/../../../../modules/juce_audio_processors/format_types/VST3_SDK",
 | 
			
		||||
					"$(SRCROOT)/../../JuceLibraryCode",
 | 
			
		||||
					"$(SRCROOT)/../../../../modules",
 | 
			
		||||
					"$(inherited)",
 | 
			
		||||
@@ -640,9 +671,10 @@
 | 
			
		||||
				INFOPLIST_FILE = Info-App.plist;
 | 
			
		||||
				INFOPLIST_PREPROCESS = NO;
 | 
			
		||||
				INSTALL_PATH = "$(HOME)/Applications";
 | 
			
		||||
				MTL_HEADER_SEARCH_PATHS = "$(SRCROOT)/../../JuceLibraryCode $(SRCROOT)/../../../../modules";
 | 
			
		||||
				OTHER_CFLAGS = "-Wall -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wswitch-enum -Wsign-conversion -Wsign-compare -Wunreachable-code -Wcast-align -Wno-ignored-qualifiers -Wshorten-64-to-32 -Wconversion -Wint-conversion -Wconditional-uninitialized -Wconstant-conversion -Wbool-conversion -Wextra-semi -Wshift-sign-overflow -Wno-missing-field-initializers -Wshadow-all -Wnullable-to-nonnull-conversion";
 | 
			
		||||
				OTHER_CPLUSPLUSFLAGS = "-Woverloaded-virtual -Wreorder -Wzero-as-null-pointer-constant -Wunused-private-field -Winconsistent-missing-destructor-override -Wall -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wswitch-enum -Wsign-conversion -Wsign-compare -Wunreachable-code -Wcast-align -Wno-ignored-qualifiers -Wshorten-64-to-32 -Wconversion -Wint-conversion -Wconditional-uninitialized -Wconstant-conversion -Wbool-conversion -Wextra-semi -Wshift-sign-overflow -Wno-missing-field-initializers -Wshadow-all -Wnullable-to-nonnull-conversion";
 | 
			
		||||
				MTL_HEADER_SEARCH_PATHS = "$(SRCROOT)/../../../../modules/juce_audio_processors/format_types/LV2_SDK/lilv/src $(SRCROOT)/../../../../modules/juce_audio_processors/format_types/LV2_SDK/lilv $(SRCROOT)/../../../../modules/juce_audio_processors/format_types/LV2_SDK/sratom $(SRCROOT)/../../../../modules/juce_audio_processors/format_types/LV2_SDK/sord/src $(SRCROOT)/../../../../modules/juce_audio_processors/format_types/LV2_SDK/sord $(SRCROOT)/../../../../modules/juce_audio_processors/format_types/LV2_SDK/serd $(SRCROOT)/../../../../modules/juce_audio_processors/format_types/LV2_SDK/lv2 $(SRCROOT)/../../../../modules/juce_audio_processors/format_types/LV2_SDK $(SRCROOT)/../../../../modules/juce_audio_processors/format_types/VST3_SDK $(SRCROOT)/../../JuceLibraryCode $(SRCROOT)/../../../../modules";
 | 
			
		||||
				OTHER_CFLAGS = "-Wall -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wswitch-enum -Wsign-conversion -Wsign-compare -Wunreachable-code -Wcast-align -Wno-ignored-qualifiers -Wshorten-64-to-32 -Wconversion -Wint-conversion -Wconditional-uninitialized -Wconstant-conversion -Wbool-conversion -Wextra-semi -Wshift-sign-overflow -Wshadow-all -Wnullable-to-nonnull-conversion -Wmissing-prototypes -Wunguarded-availability -Wunguarded-availability-new";
 | 
			
		||||
				OTHER_CPLUSPLUSFLAGS = "-Woverloaded-virtual -Wreorder -Wzero-as-null-pointer-constant -Wunused-private-field -Winconsistent-missing-destructor-override -Wall -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wswitch-enum -Wsign-conversion -Wsign-compare -Wunreachable-code -Wcast-align -Wno-ignored-qualifiers -Wshorten-64-to-32 -Wconversion -Wint-conversion -Wconditional-uninitialized -Wconstant-conversion -Wbool-conversion -Wextra-semi -Wshift-sign-overflow -Wshadow-all -Wnullable-to-nonnull-conversion -Wmissing-prototypes -Wunguarded-availability -Wunguarded-availability-new";
 | 
			
		||||
				OTHER_LDFLAGS = "-weak_framework Metal -weak_framework MetalKit -weak_framework UserNotifications";
 | 
			
		||||
				PRODUCT_BUNDLE_IDENTIFIER = com.rmsl.jucedemorunner;
 | 
			
		||||
				PRODUCT_NAME = "DemoRunner";
 | 
			
		||||
				USE_HEADERMAP = NO;
 | 
			
		||||
 
 | 
			
		||||
@@ -42,18 +42,6 @@
 | 
			
		||||
      "filename": "Icon-Spotlight-40@3x.png",
 | 
			
		||||
      "scale": "3x"
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      "idiom": "iphone",
 | 
			
		||||
      "size": "57x57",
 | 
			
		||||
      "filename": "Icon.png",
 | 
			
		||||
      "scale": "1x"
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      "idiom": "iphone",
 | 
			
		||||
      "size": "57x57",
 | 
			
		||||
      "filename": "Icon@2x.png",
 | 
			
		||||
      "scale": "2x"
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      "idiom": "iphone",
 | 
			
		||||
      "size": "60x60",
 | 
			
		||||
@@ -102,30 +90,6 @@
 | 
			
		||||
      "filename": "Icon-Spotlight-40@2x-1.png",
 | 
			
		||||
      "scale": "2x"
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      "idiom": "ipad",
 | 
			
		||||
      "size": "50x50",
 | 
			
		||||
      "filename": "Icon-Small-50.png",
 | 
			
		||||
      "scale": "1x"
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      "idiom": "ipad",
 | 
			
		||||
      "size": "50x50",
 | 
			
		||||
      "filename": "Icon-Small-50@2x.png",
 | 
			
		||||
      "scale": "2x"
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      "idiom": "ipad",
 | 
			
		||||
      "size": "72x72",
 | 
			
		||||
      "filename": "Icon-72.png",
 | 
			
		||||
      "scale": "1x"
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      "idiom": "ipad",
 | 
			
		||||
      "size": "72x72",
 | 
			
		||||
      "filename": "Icon-72@2x.png",
 | 
			
		||||
      "scale": "2x"
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      "idiom": "ipad",
 | 
			
		||||
      "size": "76x76",
 | 
			
		||||
 
 | 
			
		||||
| 
		 Before Width: | Height: | Size: 5.8 KiB  | 
| 
		 Before Width: | Height: | Size: 14 KiB  | 
| 
		 Before Width: | Height: | Size: 4.3 KiB  | 
| 
		 Before Width: | Height: | Size: 9.9 KiB  | 
| 
		 Before Width: | Height: | Size: 5.4 KiB  | 
| 
		 Before Width: | Height: | Size: 12 KiB  | 
@@ -30,9 +30,9 @@
 | 
			
		||||
    <key>CFBundleSignature</key>
 | 
			
		||||
    <string>????</string>
 | 
			
		||||
    <key>CFBundleShortVersionString</key>
 | 
			
		||||
    <string>6.1.2</string>
 | 
			
		||||
    <string>7.0.2</string>
 | 
			
		||||
    <key>CFBundleVersion</key>
 | 
			
		||||
    <string>6.1.2</string>
 | 
			
		||||
    <string>7.0.2</string>
 | 
			
		||||
    <key>NSHumanReadableCopyright</key>
 | 
			
		||||
    <string>Copyright (c) 2020 - Raw Material Software Limited</string>
 | 
			
		||||
    <key>NSHighResolutionCapable</key>
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										10
									
								
								deps/juce/examples/DemoRunner/CMakeLists.txt
									
									
									
									
										vendored
									
									
								
							
							
						
						@@ -1,15 +1,15 @@
 | 
			
		||||
# ==============================================================================
 | 
			
		||||
#
 | 
			
		||||
#  This file is part of the JUCE library.
 | 
			
		||||
#  Copyright (c) 2020 - Raw Material Software Limited
 | 
			
		||||
#  Copyright (c) 2022 - Raw Material Software Limited
 | 
			
		||||
#
 | 
			
		||||
#  JUCE is an open source library subject to commercial or open-source
 | 
			
		||||
#  licensing.
 | 
			
		||||
#
 | 
			
		||||
#  By using JUCE, you agree to the terms of both the JUCE 6 End-User License
 | 
			
		||||
#  Agreement and JUCE Privacy Policy (both effective as of the 16th June 2020).
 | 
			
		||||
#  By using JUCE, you agree to the terms of both the JUCE 7 End-User License
 | 
			
		||||
#  Agreement and JUCE Privacy Policy.
 | 
			
		||||
#
 | 
			
		||||
#  End User License Agreement: www.juce.com/juce-6-licence
 | 
			
		||||
#  End User License Agreement: www.juce.com/juce-7-licence
 | 
			
		||||
#  Privacy Policy: www.juce.com/juce-privacy-policy
 | 
			
		||||
#
 | 
			
		||||
#  Or: You may also use this code under the terms of the GPL v3 (see
 | 
			
		||||
@@ -55,6 +55,8 @@ target_compile_definitions(DemoRunner PRIVATE
 | 
			
		||||
    PIP_JUCE_EXAMPLES_DIRECTORY_STRING="${JUCE_SOURCE_DIR}/examples"
 | 
			
		||||
    JUCE_ALLOW_STATIC_NULL_VARIABLES=0
 | 
			
		||||
    JUCE_DEMO_RUNNER=1
 | 
			
		||||
    JUCE_PLUGINHOST_LV2=1
 | 
			
		||||
    JUCE_PLUGINHOST_VST3=1
 | 
			
		||||
    JUCE_STRICT_REFCOUNTEDPOINTER=1
 | 
			
		||||
    JUCE_UNIT_TESTS=1
 | 
			
		||||
    JUCE_USE_CAMERA=1
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										66
									
								
								deps/juce/examples/DemoRunner/DemoRunner.jucer
									
									
									
									
										vendored
									
									
								
							
							
						
						@@ -1,7 +1,7 @@
 | 
			
		||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
			
		||||
 | 
			
		||||
<JUCERPROJECT name="DemoRunner" projectType="guiapp" defines="JUCE_DEMO_RUNNER=1
JUCE_UNIT_TESTS=1"
 | 
			
		||||
              bundleIdentifier="com.rmsl.jucedemorunner" version="6.1.2" companyName="Raw Material Software Limited"
 | 
			
		||||
              bundleIdentifier="com.rmsl.jucedemorunner" version="7.0.2" companyName="Raw Material Software Limited"
 | 
			
		||||
              companyCopyright="Copyright (c) 2020 - Raw Material Software Limited"
 | 
			
		||||
              companyWebsite="https://www.juce.com/" companyEmail="info@juce.com"
 | 
			
		||||
              id="yj7xMM" reportAppUsage="0" useAppConfig="0" addUsingNamespaceToJuceHeader="1"
 | 
			
		||||
@@ -33,7 +33,8 @@
 | 
			
		||||
  <EXPORTFORMATS>
 | 
			
		||||
    <XCODE_MAC targetFolder="Builds/MacOSX" smallIcon="YyqWd2" bigIcon="YyqWd2"
 | 
			
		||||
               customXcodeResourceFolders="../Assets
../Audio 
../DSP 
../GUI 
../Utilities"
 | 
			
		||||
               microphonePermissionNeeded="1" cameraPermissionNeeded="1" applicationCategory="public.app-category.developer-tools">
 | 
			
		||||
               microphonePermissionNeeded="1" cameraPermissionNeeded="1" applicationCategory="public.app-category.developer-tools"
 | 
			
		||||
               iosBluetoothPermissionNeeded="1">
 | 
			
		||||
      <CONFIGURATIONS>
 | 
			
		||||
        <CONFIGURATION isDebug="1" name="Debug" recommendedWarnings="LLVM"/>
 | 
			
		||||
        <CONFIGURATION isDebug="0" name="Release" recommendedWarnings="LLVM"/>
 | 
			
		||||
@@ -90,7 +91,8 @@
 | 
			
		||||
    <ANDROIDSTUDIO targetFolder="Builds/Android" androidMinimumSDK="23" microphonePermissionNeeded="1"
 | 
			
		||||
                   androidBluetoothNeeded="1" androidExternalReadNeeded="1" androidExternalWriteNeeded="1"
 | 
			
		||||
                   androidEnableContentSharing="1" androidExtraAssetsFolder="../Assets"
 | 
			
		||||
                   smallIcon="YyqWd2" bigIcon="YyqWd2" cameraPermissionNeeded="1">
 | 
			
		||||
                   smallIcon="YyqWd2" bigIcon="YyqWd2" cameraPermissionNeeded="1"
 | 
			
		||||
                   androidTargetSDK="31">
 | 
			
		||||
      <CONFIGURATIONS>
 | 
			
		||||
        <CONFIGURATION isDebug="1" name="Debug" recommendedWarnings="LLVM"/>
 | 
			
		||||
        <CONFIGURATION isDebug="0" name="Release" recommendedWarnings="LLVM"/>
 | 
			
		||||
@@ -149,34 +151,6 @@
 | 
			
		||||
        <MODULEPATH id="juce_analytics" path="../../modules"/>
 | 
			
		||||
      </MODULEPATHS>
 | 
			
		||||
    </XCODE_IPHONE>
 | 
			
		||||
    <VS2015 targetFolder="Builds/VisualStudio2015" smallIcon="YyqWd2" bigIcon="YyqWd2"
 | 
			
		||||
            extraCompilerFlags="/w44265 /w45038 /w44062 /bigobj">
 | 
			
		||||
      <CONFIGURATIONS>
 | 
			
		||||
        <CONFIGURATION isDebug="1" name="Debug"/>
 | 
			
		||||
        <CONFIGURATION isDebug="0" name="Release" useRuntimeLibDLL="0"/>
 | 
			
		||||
      </CONFIGURATIONS>
 | 
			
		||||
      <MODULEPATHS>
 | 
			
		||||
        <MODULEPATH id="juce_video" path="../../modules"/>
 | 
			
		||||
        <MODULEPATH id="juce_product_unlocking" path="../../modules"/>
 | 
			
		||||
        <MODULEPATH id="juce_osc" path="../../modules"/>
 | 
			
		||||
        <MODULEPATH id="juce_opengl" path="../../modules"/>
 | 
			
		||||
        <MODULEPATH id="juce_gui_extra" path="../../modules"/>
 | 
			
		||||
        <MODULEPATH id="juce_gui_basics" path="../../modules"/>
 | 
			
		||||
        <MODULEPATH id="juce_graphics" path="../../modules"/>
 | 
			
		||||
        <MODULEPATH id="juce_events" path="../../modules"/>
 | 
			
		||||
        <MODULEPATH id="juce_dsp" path="../../modules"/>
 | 
			
		||||
        <MODULEPATH id="juce_data_structures" path="../../modules"/>
 | 
			
		||||
        <MODULEPATH id="juce_cryptography" path="../../modules"/>
 | 
			
		||||
        <MODULEPATH id="juce_core" path="../../modules"/>
 | 
			
		||||
        <MODULEPATH id="juce_box2d" path="../../modules"/>
 | 
			
		||||
        <MODULEPATH id="juce_audio_utils" path="../../modules"/>
 | 
			
		||||
        <MODULEPATH id="juce_audio_processors" path="../../modules"/>
 | 
			
		||||
        <MODULEPATH id="juce_audio_formats" path="../../modules"/>
 | 
			
		||||
        <MODULEPATH id="juce_audio_devices" path="../../modules"/>
 | 
			
		||||
        <MODULEPATH id="juce_audio_basics" path="../../modules"/>
 | 
			
		||||
        <MODULEPATH id="juce_analytics" path="../../modules"/>
 | 
			
		||||
      </MODULEPATHS>
 | 
			
		||||
    </VS2015>
 | 
			
		||||
    <VS2017 targetFolder="Builds/VisualStudio2017" smallIcon="YyqWd2" bigIcon="YyqWd2"
 | 
			
		||||
            extraCompilerFlags="/w44265 /w45038 /w44062">
 | 
			
		||||
      <CONFIGURATIONS>
 | 
			
		||||
@@ -233,6 +207,34 @@
 | 
			
		||||
        <MODULEPATH id="juce_analytics" path="../../modules"/>
 | 
			
		||||
      </MODULEPATHS>
 | 
			
		||||
    </VS2019>
 | 
			
		||||
    <VS2022 targetFolder="Builds/VisualStudio2022" smallIcon="YyqWd2" bigIcon="YyqWd2"
 | 
			
		||||
            extraCompilerFlags="/w44265 /w45038 /w44062">
 | 
			
		||||
      <CONFIGURATIONS>
 | 
			
		||||
        <CONFIGURATION isDebug="1" name="Debug" targetName="DemoRunner"/>
 | 
			
		||||
        <CONFIGURATION isDebug="0" name="Release" useRuntimeLibDLL="0" targetName="DemoRunner"/>
 | 
			
		||||
      </CONFIGURATIONS>
 | 
			
		||||
      <MODULEPATHS>
 | 
			
		||||
        <MODULEPATH id="juce_video" path="../../modules"/>
 | 
			
		||||
        <MODULEPATH id="juce_product_unlocking" path="../../modules"/>
 | 
			
		||||
        <MODULEPATH id="juce_osc" path="../../modules"/>
 | 
			
		||||
        <MODULEPATH id="juce_opengl" path="../../modules"/>
 | 
			
		||||
        <MODULEPATH id="juce_gui_extra" path="../../modules"/>
 | 
			
		||||
        <MODULEPATH id="juce_gui_basics" path="../../modules"/>
 | 
			
		||||
        <MODULEPATH id="juce_graphics" path="../../modules"/>
 | 
			
		||||
        <MODULEPATH id="juce_events" path="../../modules"/>
 | 
			
		||||
        <MODULEPATH id="juce_dsp" path="../../modules"/>
 | 
			
		||||
        <MODULEPATH id="juce_data_structures" path="../../modules"/>
 | 
			
		||||
        <MODULEPATH id="juce_cryptography" path="../../modules"/>
 | 
			
		||||
        <MODULEPATH id="juce_core" path="../../modules"/>
 | 
			
		||||
        <MODULEPATH id="juce_box2d" path="../../modules"/>
 | 
			
		||||
        <MODULEPATH id="juce_audio_utils" path="../../modules"/>
 | 
			
		||||
        <MODULEPATH id="juce_audio_processors" path="../../modules"/>
 | 
			
		||||
        <MODULEPATH id="juce_audio_formats" path="../../modules"/>
 | 
			
		||||
        <MODULEPATH id="juce_audio_devices" path="../../modules"/>
 | 
			
		||||
        <MODULEPATH id="juce_audio_basics" path="../../modules"/>
 | 
			
		||||
        <MODULEPATH id="juce_analytics" path="../../modules"/>
 | 
			
		||||
      </MODULEPATHS>
 | 
			
		||||
    </VS2022>
 | 
			
		||||
  </EXPORTFORMATS>
 | 
			
		||||
  <MODULES>
 | 
			
		||||
    <MODULE id="juce_analytics" showAllCode="1" useLocalCopy="0" useGlobalPath="0"/>
 | 
			
		||||
@@ -257,7 +259,7 @@
 | 
			
		||||
    <MODULE id="juce_video" showAllCode="1" useLocalCopy="0" useGlobalPath="0"/>
 | 
			
		||||
  </MODULES>
 | 
			
		||||
  <JUCEOPTIONS JUCE_USE_CAMERA="1" JUCE_USE_MP3AUDIOFORMAT="1" JUCE_ALLOW_STATIC_NULL_VARIABLES="0"
 | 
			
		||||
               JUCE_STRICT_REFCOUNTEDPOINTER="1"/>
 | 
			
		||||
               JUCE_STRICT_REFCOUNTEDPOINTER="1" JUCE_PLUGINHOST_LV2="1" JUCE_PLUGINHOST_VST3="1"/>
 | 
			
		||||
  <LIVE_SETTINGS>
 | 
			
		||||
    <OSX/>
 | 
			
		||||
  </LIVE_SETTINGS>
 | 
			
		||||
 
 | 
			
		||||
@@ -1,60 +1,60 @@
 | 
			
		||||
/*
 | 
			
		||||
 | 
			
		||||
    IMPORTANT! This file is auto-generated each time you save your
 | 
			
		||||
    project - if you alter its contents, your changes may be overwritten!
 | 
			
		||||
 | 
			
		||||
    This is the header file that your files should include in order to get all the
 | 
			
		||||
    JUCE library headers. You should avoid including the JUCE headers directly in
 | 
			
		||||
    your own source files, because that wouldn't pick up the correct configuration
 | 
			
		||||
    options for your app.
 | 
			
		||||
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#include <juce_analytics/juce_analytics.h>
 | 
			
		||||
#include <juce_audio_basics/juce_audio_basics.h>
 | 
			
		||||
#include <juce_audio_devices/juce_audio_devices.h>
 | 
			
		||||
#include <juce_audio_formats/juce_audio_formats.h>
 | 
			
		||||
#include <juce_audio_processors/juce_audio_processors.h>
 | 
			
		||||
#include <juce_audio_utils/juce_audio_utils.h>
 | 
			
		||||
#include <juce_box2d/juce_box2d.h>
 | 
			
		||||
#include <juce_core/juce_core.h>
 | 
			
		||||
#include <juce_cryptography/juce_cryptography.h>
 | 
			
		||||
#include <juce_data_structures/juce_data_structures.h>
 | 
			
		||||
#include <juce_dsp/juce_dsp.h>
 | 
			
		||||
#include <juce_events/juce_events.h>
 | 
			
		||||
#include <juce_graphics/juce_graphics.h>
 | 
			
		||||
#include <juce_gui_basics/juce_gui_basics.h>
 | 
			
		||||
#include <juce_gui_extra/juce_gui_extra.h>
 | 
			
		||||
#include <juce_opengl/juce_opengl.h>
 | 
			
		||||
#include <juce_osc/juce_osc.h>
 | 
			
		||||
#include <juce_product_unlocking/juce_product_unlocking.h>
 | 
			
		||||
#include <juce_video/juce_video.h>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#if defined (JUCE_PROJUCER_VERSION) && JUCE_PROJUCER_VERSION < JUCE_VERSION
 | 
			
		||||
 /** If you've hit this error then the version of the Projucer that was used to generate this project is
 | 
			
		||||
     older than the version of the JUCE modules being included. To fix this error, re-save your project
 | 
			
		||||
     using the latest version of the Projucer or, if you aren't using the Projucer to manage your project,
 | 
			
		||||
     remove the JUCE_PROJUCER_VERSION define.
 | 
			
		||||
 */
 | 
			
		||||
 #error "This project was last saved using an outdated version of the Projucer! Re-save this project with the latest version to fix this error."
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if ! DONT_SET_USING_JUCE_NAMESPACE
 | 
			
		||||
 // If your code uses a lot of JUCE classes, then this will obviously save you
 | 
			
		||||
 // a lot of typing, but can be disabled by setting DONT_SET_USING_JUCE_NAMESPACE.
 | 
			
		||||
 using namespace juce;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if ! JUCE_DONT_DECLARE_PROJECTINFO
 | 
			
		||||
namespace ProjectInfo
 | 
			
		||||
{
 | 
			
		||||
    const char* const  projectName    = "DemoRunner";
 | 
			
		||||
    const char* const  companyName    = "Raw Material Software Limited";
 | 
			
		||||
    const char* const  versionString  = "6.1.2";
 | 
			
		||||
    const int          versionNumber  = 0x60102;
 | 
			
		||||
}
 | 
			
		||||
#endif
 | 
			
		||||
/*
 | 
			
		||||
 | 
			
		||||
    IMPORTANT! This file is auto-generated each time you save your
 | 
			
		||||
    project - if you alter its contents, your changes may be overwritten!
 | 
			
		||||
 | 
			
		||||
    This is the header file that your files should include in order to get all the
 | 
			
		||||
    JUCE library headers. You should avoid including the JUCE headers directly in
 | 
			
		||||
    your own source files, because that wouldn't pick up the correct configuration
 | 
			
		||||
    options for your app.
 | 
			
		||||
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#include <juce_analytics/juce_analytics.h>
 | 
			
		||||
#include <juce_audio_basics/juce_audio_basics.h>
 | 
			
		||||
#include <juce_audio_devices/juce_audio_devices.h>
 | 
			
		||||
#include <juce_audio_formats/juce_audio_formats.h>
 | 
			
		||||
#include <juce_audio_processors/juce_audio_processors.h>
 | 
			
		||||
#include <juce_audio_utils/juce_audio_utils.h>
 | 
			
		||||
#include <juce_box2d/juce_box2d.h>
 | 
			
		||||
#include <juce_core/juce_core.h>
 | 
			
		||||
#include <juce_cryptography/juce_cryptography.h>
 | 
			
		||||
#include <juce_data_structures/juce_data_structures.h>
 | 
			
		||||
#include <juce_dsp/juce_dsp.h>
 | 
			
		||||
#include <juce_events/juce_events.h>
 | 
			
		||||
#include <juce_graphics/juce_graphics.h>
 | 
			
		||||
#include <juce_gui_basics/juce_gui_basics.h>
 | 
			
		||||
#include <juce_gui_extra/juce_gui_extra.h>
 | 
			
		||||
#include <juce_opengl/juce_opengl.h>
 | 
			
		||||
#include <juce_osc/juce_osc.h>
 | 
			
		||||
#include <juce_product_unlocking/juce_product_unlocking.h>
 | 
			
		||||
#include <juce_video/juce_video.h>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#if defined (JUCE_PROJUCER_VERSION) && JUCE_PROJUCER_VERSION < JUCE_VERSION
 | 
			
		||||
 /** If you've hit this error then the version of the Projucer that was used to generate this project is
 | 
			
		||||
     older than the version of the JUCE modules being included. To fix this error, re-save your project
 | 
			
		||||
     using the latest version of the Projucer or, if you aren't using the Projucer to manage your project,
 | 
			
		||||
     remove the JUCE_PROJUCER_VERSION define.
 | 
			
		||||
 */
 | 
			
		||||
 #error "This project was last saved using an outdated version of the Projucer! Re-save this project with the latest version to fix this error."
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if ! DONT_SET_USING_JUCE_NAMESPACE
 | 
			
		||||
 // If your code uses a lot of JUCE classes, then this will obviously save you
 | 
			
		||||
 // a lot of typing, but can be disabled by setting DONT_SET_USING_JUCE_NAMESPACE.
 | 
			
		||||
 using namespace juce;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if ! JUCE_DONT_DECLARE_PROJECTINFO
 | 
			
		||||
namespace ProjectInfo
 | 
			
		||||
{
 | 
			
		||||
    const char* const  projectName    = "DemoRunner";
 | 
			
		||||
    const char* const  companyName    = "Raw Material Software Limited";
 | 
			
		||||
    const char* const  versionString  = "7.0.2";
 | 
			
		||||
    const int          versionNumber  = 0x70002;
 | 
			
		||||
}
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
/*
 | 
			
		||||
 | 
			
		||||
    IMPORTANT! This file is auto-generated each time you save your
 | 
			
		||||
    project - if you alter its contents, your changes may be overwritten!
 | 
			
		||||
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#include <juce_analytics/juce_analytics.cpp>
 | 
			
		||||
/*
 | 
			
		||||
 | 
			
		||||
    IMPORTANT! This file is auto-generated each time you save your
 | 
			
		||||
    project - if you alter its contents, your changes may be overwritten!
 | 
			
		||||
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#include <juce_analytics/juce_analytics.cpp>
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
/*
 | 
			
		||||
 | 
			
		||||
    IMPORTANT! This file is auto-generated each time you save your
 | 
			
		||||
    project - if you alter its contents, your changes may be overwritten!
 | 
			
		||||
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#include <juce_audio_basics/juce_audio_basics.cpp>
 | 
			
		||||
/*
 | 
			
		||||
 | 
			
		||||
    IMPORTANT! This file is auto-generated each time you save your
 | 
			
		||||
    project - if you alter its contents, your changes may be overwritten!
 | 
			
		||||
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#include <juce_audio_basics/juce_audio_basics.cpp>
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
/*
 | 
			
		||||
 | 
			
		||||
    IMPORTANT! This file is auto-generated each time you save your
 | 
			
		||||
    project - if you alter its contents, your changes may be overwritten!
 | 
			
		||||
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#include <juce_audio_devices/juce_audio_devices.cpp>
 | 
			
		||||
/*
 | 
			
		||||
 | 
			
		||||
    IMPORTANT! This file is auto-generated each time you save your
 | 
			
		||||
    project - if you alter its contents, your changes may be overwritten!
 | 
			
		||||
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#include <juce_audio_devices/juce_audio_devices.cpp>
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
/*
 | 
			
		||||
 | 
			
		||||
    IMPORTANT! This file is auto-generated each time you save your
 | 
			
		||||
    project - if you alter its contents, your changes may be overwritten!
 | 
			
		||||
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#include <juce_audio_formats/juce_audio_formats.cpp>
 | 
			
		||||
/*
 | 
			
		||||
 | 
			
		||||
    IMPORTANT! This file is auto-generated each time you save your
 | 
			
		||||
    project - if you alter its contents, your changes may be overwritten!
 | 
			
		||||
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#include <juce_audio_formats/juce_audio_formats.cpp>
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
/*
 | 
			
		||||
 | 
			
		||||
    IMPORTANT! This file is auto-generated each time you save your
 | 
			
		||||
    project - if you alter its contents, your changes may be overwritten!
 | 
			
		||||
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#include <juce_audio_processors/juce_audio_processors.cpp>
 | 
			
		||||
/*
 | 
			
		||||
 | 
			
		||||
    IMPORTANT! This file is auto-generated each time you save your
 | 
			
		||||
    project - if you alter its contents, your changes may be overwritten!
 | 
			
		||||
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#include <juce_audio_processors/juce_audio_processors.cpp>
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										8
									
								
								deps/juce/examples/DemoRunner/JuceLibraryCode/include_juce_audio_processors_ara.cpp
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,8 @@
 | 
			
		||||
/*
 | 
			
		||||
 | 
			
		||||
    IMPORTANT! This file is auto-generated each time you save your
 | 
			
		||||
    project - if you alter its contents, your changes may be overwritten!
 | 
			
		||||
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#include <juce_audio_processors/juce_audio_processors_ara.cpp>
 | 
			
		||||
							
								
								
									
										8
									
								
								deps/juce/examples/DemoRunner/JuceLibraryCode/include_juce_audio_processors_lv2_libs.cpp
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,8 @@
 | 
			
		||||
/*
 | 
			
		||||
 | 
			
		||||
    IMPORTANT! This file is auto-generated each time you save your
 | 
			
		||||
    project - if you alter its contents, your changes may be overwritten!
 | 
			
		||||
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#include <juce_audio_processors/juce_audio_processors_lv2_libs.cpp>
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
/*
 | 
			
		||||
 | 
			
		||||
    IMPORTANT! This file is auto-generated each time you save your
 | 
			
		||||
    project - if you alter its contents, your changes may be overwritten!
 | 
			
		||||
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#include <juce_audio_utils/juce_audio_utils.cpp>
 | 
			
		||||
/*
 | 
			
		||||
 | 
			
		||||
    IMPORTANT! This file is auto-generated each time you save your
 | 
			
		||||
    project - if you alter its contents, your changes may be overwritten!
 | 
			
		||||
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#include <juce_audio_utils/juce_audio_utils.cpp>
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
/*
 | 
			
		||||
 | 
			
		||||
    IMPORTANT! This file is auto-generated each time you save your
 | 
			
		||||
    project - if you alter its contents, your changes may be overwritten!
 | 
			
		||||
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#include <juce_box2d/juce_box2d.cpp>
 | 
			
		||||
/*
 | 
			
		||||
 | 
			
		||||
    IMPORTANT! This file is auto-generated each time you save your
 | 
			
		||||
    project - if you alter its contents, your changes may be overwritten!
 | 
			
		||||
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#include <juce_box2d/juce_box2d.cpp>
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
/*
 | 
			
		||||
 | 
			
		||||
    IMPORTANT! This file is auto-generated each time you save your
 | 
			
		||||
    project - if you alter its contents, your changes may be overwritten!
 | 
			
		||||
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#include <juce_core/juce_core.cpp>
 | 
			
		||||
/*
 | 
			
		||||
 | 
			
		||||
    IMPORTANT! This file is auto-generated each time you save your
 | 
			
		||||
    project - if you alter its contents, your changes may be overwritten!
 | 
			
		||||
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#include <juce_core/juce_core.cpp>
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
/*
 | 
			
		||||
 | 
			
		||||
    IMPORTANT! This file is auto-generated each time you save your
 | 
			
		||||
    project - if you alter its contents, your changes may be overwritten!
 | 
			
		||||
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#include <juce_cryptography/juce_cryptography.cpp>
 | 
			
		||||
/*
 | 
			
		||||
 | 
			
		||||
    IMPORTANT! This file is auto-generated each time you save your
 | 
			
		||||
    project - if you alter its contents, your changes may be overwritten!
 | 
			
		||||
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#include <juce_cryptography/juce_cryptography.cpp>
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
/*
 | 
			
		||||
 | 
			
		||||
    IMPORTANT! This file is auto-generated each time you save your
 | 
			
		||||
    project - if you alter its contents, your changes may be overwritten!
 | 
			
		||||
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#include <juce_data_structures/juce_data_structures.cpp>
 | 
			
		||||
/*
 | 
			
		||||
 | 
			
		||||
    IMPORTANT! This file is auto-generated each time you save your
 | 
			
		||||
    project - if you alter its contents, your changes may be overwritten!
 | 
			
		||||
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#include <juce_data_structures/juce_data_structures.cpp>
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
/*
 | 
			
		||||
 | 
			
		||||
    IMPORTANT! This file is auto-generated each time you save your
 | 
			
		||||
    project - if you alter its contents, your changes may be overwritten!
 | 
			
		||||
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#include <juce_dsp/juce_dsp.cpp>
 | 
			
		||||
/*
 | 
			
		||||
 | 
			
		||||
    IMPORTANT! This file is auto-generated each time you save your
 | 
			
		||||
    project - if you alter its contents, your changes may be overwritten!
 | 
			
		||||
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#include <juce_dsp/juce_dsp.cpp>
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
/*
 | 
			
		||||
 | 
			
		||||
    IMPORTANT! This file is auto-generated each time you save your
 | 
			
		||||
    project - if you alter its contents, your changes may be overwritten!
 | 
			
		||||
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#include <juce_events/juce_events.cpp>
 | 
			
		||||
/*
 | 
			
		||||
 | 
			
		||||
    IMPORTANT! This file is auto-generated each time you save your
 | 
			
		||||
    project - if you alter its contents, your changes may be overwritten!
 | 
			
		||||
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#include <juce_events/juce_events.cpp>
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
/*
 | 
			
		||||
 | 
			
		||||
    IMPORTANT! This file is auto-generated each time you save your
 | 
			
		||||
    project - if you alter its contents, your changes may be overwritten!
 | 
			
		||||
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#include <juce_graphics/juce_graphics.cpp>
 | 
			
		||||
/*
 | 
			
		||||
 | 
			
		||||
    IMPORTANT! This file is auto-generated each time you save your
 | 
			
		||||
    project - if you alter its contents, your changes may be overwritten!
 | 
			
		||||
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#include <juce_graphics/juce_graphics.cpp>
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
/*
 | 
			
		||||
 | 
			
		||||
    IMPORTANT! This file is auto-generated each time you save your
 | 
			
		||||
    project - if you alter its contents, your changes may be overwritten!
 | 
			
		||||
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#include <juce_gui_basics/juce_gui_basics.cpp>
 | 
			
		||||
/*
 | 
			
		||||
 | 
			
		||||
    IMPORTANT! This file is auto-generated each time you save your
 | 
			
		||||
    project - if you alter its contents, your changes may be overwritten!
 | 
			
		||||
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#include <juce_gui_basics/juce_gui_basics.cpp>
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
/*
 | 
			
		||||
 | 
			
		||||
    IMPORTANT! This file is auto-generated each time you save your
 | 
			
		||||
    project - if you alter its contents, your changes may be overwritten!
 | 
			
		||||
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#include <juce_gui_extra/juce_gui_extra.cpp>
 | 
			
		||||
/*
 | 
			
		||||
 | 
			
		||||
    IMPORTANT! This file is auto-generated each time you save your
 | 
			
		||||
    project - if you alter its contents, your changes may be overwritten!
 | 
			
		||||
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#include <juce_gui_extra/juce_gui_extra.cpp>
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
/*
 | 
			
		||||
 | 
			
		||||
    IMPORTANT! This file is auto-generated each time you save your
 | 
			
		||||
    project - if you alter its contents, your changes may be overwritten!
 | 
			
		||||
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#include <juce_opengl/juce_opengl.cpp>
 | 
			
		||||
/*
 | 
			
		||||
 | 
			
		||||
    IMPORTANT! This file is auto-generated each time you save your
 | 
			
		||||
    project - if you alter its contents, your changes may be overwritten!
 | 
			
		||||
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#include <juce_opengl/juce_opengl.cpp>
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
/*
 | 
			
		||||
 | 
			
		||||
    IMPORTANT! This file is auto-generated each time you save your
 | 
			
		||||
    project - if you alter its contents, your changes may be overwritten!
 | 
			
		||||
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#include <juce_osc/juce_osc.cpp>
 | 
			
		||||
/*
 | 
			
		||||
 | 
			
		||||
    IMPORTANT! This file is auto-generated each time you save your
 | 
			
		||||
    project - if you alter its contents, your changes may be overwritten!
 | 
			
		||||
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#include <juce_osc/juce_osc.cpp>
 | 
			
		||||
 
 | 
			
		||||