freesolid/libbroad/BP_Scene.h
Xavier Del Campo Romero 208c6e2031
Synchronise with 2.1.2 release
A 2.1.2 release was pushed 10 years after the last modification
timestamp on CVS [1]. Unfortunately, that means these changes were
effectively untracked by CVS. What's even worse, while some of the
changes are stylistic, others are non-trivial and there is no rationale
behind them.

This commit attempts to match this 2.1.2 release, while removing
trailing whitespaces and newlines in order to keep Git (and also myself)
happy.

Trailing whitespaces have been removed with:

while read f
do
    sed -Ei 's/[[:space:]]+$//g' "$f"
done <<EOF
$(find . -iname '*.cpp' -o -iname '*.h')
EOF

Trailing newlines have been removed with:

while read f
do
    sed -i -e :a -e '/^\n*$/{$d;N;};/\n$/ba' -- "$f"
done <<EOF
$(find . -iname '*.cpp' -o -iname '*.h')
EOF

[1]: https://sourceforge.net/projects/freesolid/files/FreeSOLID-2.1.2.zip/download
2025-01-31 00:27:02 +01:00

56 lines
1.1 KiB
C++

/*
* SOLID - Software Library for Interference Detection
* Copyright (c) 2001 Dtecta <gino@dtecta.com>
*
* All rights reserved.
*/
#ifndef BP_SCENE_H
#define BP_SCENE_H
#include <vector>
#include "SOLID/broad.h"
#include "GEN_List.h"
class BP_Proxy;
class MT_Point3;
class BP_Scene {
public:
BP_Scene(void *client_data,
BP_Callback beginOverlap,
BP_Callback endOverlap) :
m_client_data(client_data),
m_beginOverlap(beginOverlap),
m_endOverlap(endOverlap) {}
~BP_Scene();
BP_Proxy *createProxy(void *object,
const MT_Point3& min,
const MT_Point3& max);
void deleteProxy(BP_Proxy *proxy);
void callBeginOverlap(void *object1, void *object2) {
m_beginOverlap(m_client_data, object1, object2);
}
void callEndOverlap(void *object1, void *object2) {
m_endOverlap(m_client_data, object1, object2);
}
GEN_List *getLists() { return m_endpointList; }
private:
typedef std::vector<BP_Proxy *> T_ProxyList;
void *m_client_data;
BP_Callback m_beginOverlap;
BP_Callback m_endOverlap;
T_ProxyList m_proxyList;
GEN_List m_endpointList[3];
};
#endif