mirror of
https://github.com/overte-org/overte.git
synced 2025-07-30 21:17:23 +02:00
47 lines
998 B
C++
47 lines
998 B
C++
//
|
|
// BuckyBalls.h
|
|
// interface/src
|
|
//
|
|
// Created by Philip on 1/2/14.
|
|
// Copyright 2013 High Fidelity, Inc.
|
|
//
|
|
// Distributed under the Apache License, Version 2.0.
|
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
|
//
|
|
|
|
#ifndef hifi_BuckyBalls_h
|
|
#define hifi_BuckyBalls_h
|
|
|
|
#include <iostream>
|
|
|
|
#include <glm/glm.hpp>
|
|
|
|
#include <HandData.h>
|
|
#include <SharedUtil.h>
|
|
|
|
#include "GeometryUtil.h"
|
|
#include "InterfaceConfig.h"
|
|
#include "Util.h"
|
|
|
|
const int NUM_BBALLS = 200;
|
|
|
|
class BuckyBalls {
|
|
public:
|
|
BuckyBalls();
|
|
void grab(PalmData& palm, float deltaTime);
|
|
void simulate(float deltaTime, const HandData* handData);
|
|
void render();
|
|
|
|
|
|
private:
|
|
|
|
glm::vec3 _bballPosition[NUM_BBALLS];
|
|
glm::vec3 _bballVelocity[NUM_BBALLS];
|
|
glm::vec3 _bballColor[NUM_BBALLS];
|
|
float _bballRadius[NUM_BBALLS];
|
|
float _bballColliding[NUM_BBALLS];
|
|
int _bballElement[NUM_BBALLS];
|
|
int _bballIsGrabbed[2];
|
|
};
|
|
|
|
#endif // hifi_BuckyBalls_h
|