From e0636a5b5e387f564b05033680ff733122629812 Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Mon, 13 Apr 2015 21:46:40 +1000 Subject: [PATCH] sphere: add stub sphere class --- Makefile.am | 2 ++ sphere.cpp | 22 ++++++++++++++++++++++ sphere.hpp | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 56 insertions(+) create mode 100644 sphere.cpp create mode 100644 sphere.hpp diff --git a/Makefile.am b/Makefile.am index 366c6582..d5a6bfc3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -161,6 +161,8 @@ UTIL_FILES = \ signal.hpp \ signal.ipp \ si.hpp \ + sphere.cpp \ + sphere.hpp \ stats.cpp \ stats.hpp \ stream.cpp \ diff --git a/sphere.cpp b/sphere.cpp new file mode 100644 index 00000000..4419219a --- /dev/null +++ b/sphere.cpp @@ -0,0 +1,22 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Copyright 2015 Danny Robson + */ + +#include "sphere.hpp" + +using util::sphere; + +//----------------------------------------------------------------------------- +template struct util::sphere<3,float>; diff --git a/sphere.hpp b/sphere.hpp new file mode 100644 index 00000000..b41abb1c --- /dev/null +++ b/sphere.hpp @@ -0,0 +1,32 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Copyright 2015 Danny Robson + */ + +#ifndef __UTIL_SPHERE_HPP +#define __UTIL_SPHERE_HPP + +#include "point.hpp" + +namespace util { + template + struct sphere { + point c; + T r; + }; + + typedef sphere<3,float> sphere3f; +} + +#endif